Gambit Version 3.0 > 'g6 g6 > '$j@*C $j@*C > #t #t > #f #f > (boolean? #t) #t > (boolean? #f) #t > (boolean? 'dix) #f > (symbol? 'dix) #t > (symbol? #f) #f > "abc" "abc" > 5 5 > dix *** ERROR IN (stdin)@12.1 -- Unbound variable: dix 1> > #\a #\a > #\A #\A > (equal? #\a #\A) #f > (character? #\a) *** ERROR IN (stdin)@16.2 -- Unbound variable: character? 1> > (char? #\a) #t > (string? "abc") #t > (procedure? <) #t > (procedure? #f) #f > (define foo <) > (set! < 5) > (procedure? <) #f > (set! < foo) > (procedure? <) #t > '#(1 2 3 4) #(1 2 3 4) > (vector? '#(1 2 3 4)) #t > (pair? '(1 2 3 4)) #t > (pair? "1234") #f > (pair? '()) #f > (null? '()) #t > '"1234" "1234" > "1234" "1234" > (quote "1234") "1234" > (equal? '(1 2 3 4) (quote (1 2 3 4))) #t > (equal? (quote '(1 2 3 4)) (quote (quote (1 2 3 4)))) #t > ((if #f + *) 3 4) 12 > (procedure? (lambda (x) (< x pivot))) #t > (define (plusI x y) (+ x y)) > (plusI 5 6) 11 > (define plusII (lambda (x y) (+ x y))) > (plusII 5 6) 11 > (+ 1 2 3 4 5 6 7 8) 36 > (+ 1 2 3) 6 > (+ 1) 1 > (+) 0 > (define plusIII (lambda (x y . rest) ...)) > (define plusIV (lambda (x . rest) ...)) > (define plusV (lambda rest ...)) > (define (plusV . rest) ...) > (if #t 'oui) oui > (if #f 'oui) > (set! foo 5) > (cond ((= 3 4) 'premier) ((< 6 4) 'deuxieme) ((not #f) 'troisieme) (else 'quatrieme)) troisieme > (case (+ 1 2) ((#f 18) 'premier) ((3 foo) 'deuxieme) (else 'troisieme)) deuxieme > (and #t #f) #f > (and #f (/ 8 0)) #f > (or #t (/ 8 0)) #t > (or (/ 8 0) #t) *** ERROR IN (stdin)@65.5 -- Division by zero (/ 8 0) 1> > foo 5 > bar *** ERROR IN (stdin)@67.1 -- Unbound variable: bar 1> > (let ((bar 4)) (+ foo bar)) 9 > bar *** ERROR IN (stdin)@69.1 -- Unbound variable: bar 1> > (let ((foo '#(1 2 3 4 5)) (bar 4)) (vector-ref foo bar)) 5 > bar *** ERROR IN (stdin)@71.1 -- Unbound variable: bar 1> > (let ((foo '#(1 2 3 4 5)) (bar 4)) (vector-ref foo bar)) 5 > (define y 7) > foo 5 > y 7 > (let ((x (- foo y)) (y (+ foo y))) (list x y)) (-2 12) > (let ((y (+ foo y)) (x (- foo y))) (list x y)) (-2 12) > (let* ((x (- foo y)) (y (+ foo y))) (list x y)) (-2 12) > (let* ((y (+ foo y)) (x (- foo y))) (list x y)) (-7 12) > (letrec ((even? (lambda (n) (or (= n 0) (odd? (- n 1))))) (odd? (lambda (n) (and (not (= n 0)) (even? (- n 1)))))) (even? 7)) #f > (begin (display "bonjour") (newline) 5) bonjour 5 >