Kitaab

Fennel 101

dev fennel lisp

published 2023-09-30 16:16

updated 2023-10-02 14:15

101:

https://fennel-lang.org/tutorial#relative-require

Iterating

Looping over table elements is done with each and an iterator like pairs (used for general tables) or ipairs (for sequential tables):

{{{fennel (each [key value (pairs {"key1" 52 "key2" 99})] (print key value))

(each [index value (ipairs ["abc" "def" "xyz"])] (print index value)) }}}