add length function to builtins.

This commit is contained in:
NunoSempere 2023-05-10 11:07:09 -04:00
parent e15cb4e3aa
commit bc55abc8f4
3 changed files with 3 additions and 2 deletions

View File

@ -57,8 +57,8 @@ Simply call the `./mumble` binary:
```
mumble> (1 2 3)
mumble> { 1 2 3 }
mumble> head (1 2 3)
mumble> { head (1 2 3) }
mumble> head {1 2 3}
mumble> { head {1 2 3) }
mumble> tail { 1 2 3 }
mumble> list ( 1 2 3 )
mumble> eval { head {1 2 3} }

BIN
mumble

Binary file not shown.

View File

@ -1001,6 +1001,7 @@ void lispenv_add_builtins(lispenv* env)
lispenv_add_builtin("tail", builtin_tail, env);
lispenv_add_builtin("eval", builtin_eval, env);
lispenv_add_builtin("join", builtin_join, env);
lispenv_add_builtin("len", builtin_len, env);
lispenv_add_builtin("def", builtin_def, env);
lispenv_add_builtin("@", builtin_define_lambda, env);
lispenv_add_builtin("ifelse", builtin_ifelse, env);