Skip to content

Instantly share code, notes, and snippets.

@polyglotpiglet
Created April 11, 2020 08:23
Show Gist options
  • Save polyglotpiglet/2f6055a0cd1af14ac578ef63ca6a38de to your computer and use it in GitHub Desktop.
Save polyglotpiglet/2f6055a0cd1af14ac578ef63ca6a38de to your computer and use it in GitHub Desktop.
object Main extends App {
import cats._
import cats.implicits._
private val now: Eval[Double] = Eval.now(math.random)
println(now.value)
println(now.value)
private val later: Eval[Double] = Eval.later(math.random)
println(later.value)
println(later.value)
private val always: Eval[Double] = Eval.always(math.random)
println(always.value)
println(always.value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment