Created
April 11, 2020 08:23
-
-
Save polyglotpiglet/2f6055a0cd1af14ac578ef63ca6a38de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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