Created
February 19, 2021 13:46
-
-
Save hatemogi/a3161347609de484730807a6a2912637 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type Signal = LazyList[Boolean] | |
def inv(xs: => Signal): Signal = xs map { ! _ } | |
def reg(init: => Boolean, d: => Signal): Signal = init #:: d | |
val tff: Signal = { | |
def d: Signal = inv(q) | |
def q: Signal = reg(false, d) | |
q | |
} | |
tff take 10 foreach println |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment