RosettaCodeData/Task/Associative-array-Iteration/Fennel/associative-array-iteration.fennel
2026-04-30 12:34:36 -04:00

13 lines
360 B
Fennel

(fn f1 [x] (print x) x)
(local t { "foo" "bar"
"baz" 6
:fortytwo 7 ; :fortytwo is equivalent to "fortytwo"
42 [ 1 2 3 ]
f1 true
"zz" f1
}
)
(each [key val (pairs t)]
(print (string.format "%28s (%9s) -> (%9s) %s" key (type key) (type val) val))
)