diff options
| author | mryouse | 2023-06-08 22:18:53 -0400 |
|---|---|---|
| committer | mryouse | 2023-06-08 22:18:53 -0400 |
| commit | c2bfe8f125c7fc4f20269eb2c616848c541a369f (patch) | |
| tree | 06830dc9b697ece942dc2ef126fd1da64d82785d | |
| parent | 4244efa55d29d3fa20d5fcba3ada1f423f87ec52 (diff) | |
more core functions
| -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) |
