2 ms·
Laziness doesn't require iterators; it can be based on lazy data structures such as lazy lists. This is the TXR Lisp interactive listener of TXR 232. Quit
by kazinator 7y ago
Laziness doesn't require iterators; it can be based on lazy data structures such as lazy lists.
This is the TXR Lisp interactive listener of TXR 232.
Quit with :quit or Ctrl-D on empty line. Ctrl-X ? for cheatsheet.
1> (defvar N (range 1))
N
2> (take 5 N)
(1 2 3 4 5)
3> (typeof N)
lcons
4> (set (car N) 42)
42
5> (take 10 N)
(42 2 3 4 5 6 7 8 9 10)