diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-10-22 23:02:50 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-10-22 23:03:26 +0300 |
| commit | 54a83a9f0506804a597875f3eaf4de874bf6762f (patch) | |
| tree | 13998bcc73244f058bcded3aa0e21c4995c28f31 /core.fnl | |
| parent | ab3377a587c96c8df185d8000570fda08fa209a4 (diff) | |
implement into as a macro
Diffstat (limited to 'core.fnl')
| -rw-r--r-- | core.fnl | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -16,18 +16,6 @@ sequential table, leaves it unchanged." (insert res [k v])) (if assoc? res tbl))) -(fn unseq [tbl] - (local res {}) - (each [_ [k v] (ipairs tbl)] - (tset res k v)) - res) - -(fn into [to from] - (match to - :vec (seq from) - :map (unseq from) - _ (error "unsupported table type" 2))) - (fn first [itbl] "Return first element of an indexed table." (. (seq itbl) 1)) @@ -221,7 +209,6 @@ sorting tables first." )) {: seq - : into : mapv : mapkv : reduce |