14 lines
492 B
Plaintext
14 lines
492 B
Plaintext
;;;; Every ASCII code point, and a few past it, as dyn chars printed one per
|
|
;;;; line. The test reads each line back with the reader and wants the same
|
|
;;;; code point, so what a char prints as is what reads as it.
|
|
|
|
(defn main [] i32
|
|
(let [v (vec-new u8)]
|
|
(dotimes [i 128] (push v (u8 i)))
|
|
(let [t (the dyn (str (slice v)))]
|
|
(dotimes [i (length t)] (println (at t i))))
|
|
(let [u (the dyn "é日😀")]
|
|
(dotimes [i (length u)] (println (at u i))))
|
|
(free v))
|
|
0)
|