klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit e7cdd31a3d2bddfc4178e8766c25d1a536b4f337
parent 31c00b099dd5bd611699d187e150b23879445502
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri,  6 May 2011 11:27:28 -0300

Added real? to the ground environment.

Diffstat:
Msrc/kgnumbers.c | 5+----
Msrc/kground.c | 3++-
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/kgnumbers.c b/src/kgnumbers.c @@ -38,10 +38,7 @@ bool kfinitep(TValue obj) { return (!ttiseinf(obj) && !ttisiinf(obj)); } bool kintegerp(TValue obj) { return ttisinteger(obj); } bool krationalp(TValue obj) { return ttisrational(obj); } /* all real are rationals in klisp */ -bool krealp(TValue obj) -{ - return ttisrational(obj) || ttiseinf(obj) || ttisiinf(obj); -} +bool krealp(TValue obj) { return ttisreal(obj); } bool kexactp(TValue obj) { return ttisexact(obj); } bool kinexactp(TValue obj) { return ttisinexact(obj); } diff --git a/src/kground.c b/src/kground.c @@ -866,7 +866,8 @@ void kinit_ground_env(klisp_State *K) */ /* 12.9.1 real? */ - /* TODO */ + add_applicative(K, ground_env, "real?", ftypep, 2, symbol, + p2tv(krealp)); /* TODO complete all other bindings of module real */