9mm/lib/head.fnl

7 lines
123 B
Fennel

; return the first item in a table
(fn head [t] (if (> (length t) 0)
(?. t 1)
[]))
{: head}