From a1851986383148593ca85675d3dafd1e8517481a Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Thu, 12 Nov 2020 19:25:57 +0300 Subject: fix(CI): overhaul --- cljlib.fnl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'cljlib.fnl') diff --git a/cljlib.fnl b/cljlib.fnl index 14b5869..f0b4d18 100644 --- a/cljlib.fnl +++ b/cljlib.fnl @@ -213,15 +213,11 @@ If `tbl' is sequential table, returns its shallow copy." ([tbl x & xs] (apply conj (conj tbl x) xs))) -(fn* consj +(fn consj [...] "Like conj but joins at the front. Modifies `tbl'." - ([] (empty [])) - ([tbl] tbl) - ([tbl x] - (when-some [x x] - (doto tbl (insert 1 x)))) - ([tbl x & xs] - (apply consj (consj tbl x) xs))) + (let [[tbl x & xs] [...]] + (if (nil? x) tbl + (consj (doto tbl (insert 1 x)) (unpack xs))))) (fn& core.cons "Insert `x' to `tbl' at the front. Modifies `tbl'." -- cgit v1.2.3