commit 4b189d1fa7bd2174592cf2174b9a810be932eccb parent 12bd54052932f6ab148882c67df3609d1e29a3f7 Author: Daniel Barlow <dan@telent.net> Date: Mon, 4 Aug 2025 23:18:34 +0100 prepend: handle case when table is nil Diffstat:
| M | lib.fnl | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib.fnl b/lib.fnl @@ -1,6 +1,8 @@ (fn prepend [head tbl] - (doto tbl - (table.insert 1 head))) + (if tbl + (doto tbl + (table.insert 1 head)) + [head])) (fn string-stream [] (let [strings []]