15 lines
443 B
Plaintext
15 lines
443 B
Plaintext
;; looping over different sequences : infinite stream, string, list and vector
|
|
;; loop stops as soon a one sequence ends.
|
|
;; the (iota 6) = ( 0 1 2 3 4 5) sequence will stop first.
|
|
|
|
|
|
(for ((i (in-naturals 1000)) (j "ABCDEFGHIJK") (k (iota 6)) (m #(o p q r s t u v w)))
|
|
(writeln i j k m))
|
|
|
|
1000 "A" 0 o
|
|
1001 "B" 1 p
|
|
1002 "C" 2 q
|
|
1003 "D" 3 r
|
|
1004 "E" 4 s
|
|
1005 "F" 5 t
|