summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-08 07:01:42 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-08 07:01:42 -0700
commit94d029b0f24756b84a94ce2b3f8fd5739166b0c5 (patch)
tree8b12005298141f11225387bd75a3e38898f4e627 /eval.c
parentf72fa1121f2571aba9f16f95d58d8e915965d765 (diff)
downloadtxr-94d029b0f24756b84a94ce2b3f8fd5739166b0c5.tar.gz
txr-94d029b0f24756b84a94ce2b3f8fd5739166b0c5.tar.bz2
txr-94d029b0f24756b84a94ce2b3f8fd5739166b0c5.zip
New functions, subtypep and typep.
* eval.c (eval_init): Register subtypep and typep. * eval.h (list_s): Existing variable declared. * lib.c (atom_s, integer_s, number_s, sequence_s, string_s): new symbol variables. (subtypep, typep): New functions. (obj_init): Initialize new symbol variables. * lib.c (atom_s, integer_s, number_s, sequence_s, string_s): Declared. * txr.1: Documented type hierarchy and the new functions.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index b4dd6bfe..dda00b49 100644
--- a/eval.c
+++ b/eval.c
@@ -4164,6 +4164,8 @@ void eval_init(void)
reg_fun(intern(lit("list*"), user_package), func_n0v(list_star_intrinsic));
reg_fun(identity_s, identity_f);
reg_fun(intern(lit("typeof"), user_package), func_n1(typeof));
+ reg_fun(intern(lit("subtypep"), user_package), func_n2(subtypep));
+ reg_fun(intern(lit("typep"), user_package), func_n2(typep));
reg_fun(intern(lit("atom"), user_package), func_n1(atom));
reg_fun(intern(lit("null"), user_package), null_f);