commit a6797b816e25681bcaa15c7b3b3b333e91308896
parent a7be1dacf85541a4bdf0135d6b1252f03b9e19fb
Author: Andres Navarro <canavarro82@gmail.com>
Date: Thu, 24 Mar 2011 00:11:04 -0300
Added combiner? to the ground environment.
Diffstat:
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/kgcombiners.c b/src/kgcombiners.c
@@ -146,3 +146,9 @@ void apply(klisp_State *K, TValue *xparams, TValue ptree,
/* 5.9.1 map */
/* TODO */
+
+/* 6.2.1 combiner? */
+/* uses ftypedp */
+
+/* Helper for combiner? */
+bool kcombinerp(TValue obj) { return ttiscombiner(obj); }
diff --git a/src/kgcombiners.h b/src/kgcombiners.h
@@ -47,4 +47,10 @@ void apply(klisp_State *K, TValue *xparams, TValue ptree,
/* 5.9.1 map */
/* TODO */
+/* 6.2.1 combiner? */
+/* uses ftypedp */
+
+/* Helper for combiner? */
+bool kcombinerp(TValue obj);
+
#endif
diff --git a/src/kground.c b/src/kground.c
@@ -368,7 +368,8 @@ void kinit_ground_env(klisp_State *K)
*/
/* 6.2.1 combiner? */
- /* TODO */
+ add_applicative(K, ground_env, "combiner?", ftypep, 2, symbol,
+ p2tv(kcombinerp));
/*
** 6.3 Pairs and lists