diff options
| -rw-r--r-- | core.neb | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -5,6 +5,15 @@ (func ++ (num) (+ num 1)) (func -- (num) (- num 1)) +(func min (lst) + (reduce + (lambda (acc x) + (if (< x acc) + x + acc)) + (rest lst) + (first lst))) + ; strings (func join (lst joiner) ; TODO this doesn't handle empty lists @@ -26,6 +35,9 @@ (#true str))) ; lists +(func extend (lst1 lst2) + (reduce append lst2 lst1)) + (func slice (lst idx) ; TODO doesn't handle lengths (if (eq? 1 idx) |
