From 6075ad414b8c11a17647beef46d9e2dad3f3e110 Mon Sep 17 00:00:00 2001 From: NalaGinrut Date: Tue, 27 Dec 2011 14:18:49 +0800 Subject: [PATCH 1/2] ADD type-of to boot-9.scm --- module/ice-9/boot-9.scm | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 03dad9b..43fce1c 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -3851,4 +3851,14 @@ module '(ice-9 q) '(make-q q-length))}." ;; `-Wunused-toplevel' warning works as expected. (eval-when (compile) (set-current-module the-root-module)) +(define (type-of x) + (cond + ((eq? x *undefined*) ') + ((null? x) ') + ((boolean? x) ') + ((number? x) ') + ((string? x) ') + ((procedure? x) ') + (else '))) + ;;; boot-9.scm ends here -- 1.7.0.4