mirror of
https://github.com/janet-lang/janet
synced 2025-07-15 16:32:53 +00:00
Update lazyseq example.
This commit is contained in:
parent
82e5d915f7
commit
93f6bb856f
@ -35,7 +35,8 @@ that was memoized."
|
|||||||
(defn cons
|
(defn cons
|
||||||
"Create a new sequence by prepending a value to the original sequence."
|
"Create a new sequence by prepending a value to the original sequence."
|
||||||
[h t]
|
[h t]
|
||||||
(delay (tuple h t)))
|
(def x (tuple h t))
|
||||||
|
(fn [] x))
|
||||||
|
|
||||||
(defn empty?
|
(defn empty?
|
||||||
"Check if a sequence is empty."
|
"Check if a sequence is empty."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user