https://github.com/arclanguage/anarki/pull/161 (More of a demo than a real proposal.) arc> (sequence->list "foo")
'(#\f #\o #\o)
arc> (sequence->list (in-range 10 0 -0.5))
'(10
9.5
9.0
8.5
8.0
7.5
7.0
6.5
6.0
5.5
5.0
4.5
4.0
3.5
3.0
2.5
2.0
1.5
1.0
0.5)
arc> (each n (in-range 10 0 -0.5) (out n (expt n 2)))
'((10 100)
(9.5 90.25)
(9.0 81.0)
(8.5 72.25)
(8.0 64.0)
(7.5 56.25)
(7.0 49.0)
(6.5 42.25)
(6.0 36.0)
(5.5 30.25)
(5.0 25.0)
(4.5 20.25)
(4.0 16.0)
(3.5 12.25)
(3.0 9.0)
(2.5 6.25)
(2.0 4.0)
(1.5 2.25)
(1.0 1.0)
(0.5 0.25))
; use racket's sort
arc> (|sort| '(a b "foo" 21) (compare > string))
'("foo" b a 21)
arc> (|sort| '(a b "foo" 21) (compare < string))
'(21 a b "foo")
arc> (sequence->list (in-producer (thunk (bytes-ref (crypto-random-bytes 1) 0)) (%do [< _ 42])))
'(56 119)
arc> (sequence->list (in-producer (thunk (bytes-ref (crypto-random-bytes 1) 0)) (%do [< _ 42])))
'(192 163 45 163 79 184 218 105 67 67 240 228)
arc> (sequence->list (in-producer (thunk (bytes-ref (crypto-random-bytes 1) 0)) (%do [< _ 42])))
'(189)
arc> (sequence->list (in-producer (thunk (bytes-ref (crypto-random-bytes 1) 0)) (%do [< _ 42])))
'(141 148 243)
arc> (define (1+ (n 0)) (+ n 1))
arc> (1+ 21)
22
arc> (1+)
1
arc> (1+:1+:1+ 21)
24
|