All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.atnos.eff.MemoCreation.scala Maven / Gradle / Ivy

The newest version!
package org.atnos.eff

import Eff._

trait MemoCreation extends MemoTypes {

  def memoize[R: _memo, A](key: AnyRef, a: => A): Eff[R, A] =
    send[Memoized, R, A](Store(key, () => a))

  def getCache[R: _memo]: Eff[R, Cache] =
    send[Memoized, R, Cache](GetCache())

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy