diff options
Diffstat (limited to 'neb/std/lists.py')
| -rw-r--r-- | neb/std/lists.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/neb/std/lists.py b/neb/std/lists.py index 9335c3d..ae5e56c 100644 --- a/neb/std/lists.py +++ b/neb/std/lists.py @@ -185,3 +185,11 @@ prepend_func = Builtin("prepend", interpretPrepend, [Arg("list", TypeEnum.LIST), prepend_multi = MultiFunction("prepend") prepend_multi.register(prepend_func) LISTS.register("prepend", prepend_multi) + +def interpretListMost(symbol, args, env, ns): + return List(args[0].args[:-1]) + +most_func = Builtin("most", interpretListMost, [Arg("list", TypeEnum.LIST)], return_type=Type(":list")) +most_multi = MultiFunction("most") +most_multi.register(most_func) +LISTS.register("most", most_multi) |
