core.scm

Path: lib/scheme/core.scm
Last Update: Sun Feb 17 20:50:31 -0800 2008
dot/f_0.png

(define string->symbol

  (lambda (sym) (send sym 'sym)))

(define substring

  (lambda (string to from) (send string (quote []) to from)))

(define null?

  (lambda (expr) (= expr ())))

(define >

  (lambda (x y) (send x '> y)))

(define <

  (lambda (x y) (send x '< y)))

(define =

  (lambda (x y) (send x '== y)))

(define not

  (lambda (expr) (if expr #f #t)))

(define car

  (lambda (lst) (send lst 'first)))

(define cdr

  (lambda (lst) (send lst 'rest)))

;; and friends (define cadr

  (lambda (lst) (car (cdr lst))))

[Validate]