2016-05-15 22:07:44 +00:00
|
|
|
#! /bin/sh
|
2016-07-22 15:13:51 +00:00
|
|
|
#set -x
|
2016-05-15 22:07:44 +00:00
|
|
|
mes=${1-./mes.scm}
|
|
|
|
echo 0 | $mes
|
|
|
|
echo 1 | $mes
|
|
|
|
echo "(car '(0 1))" | $mes
|
2016-05-29 11:44:03 +00:00
|
|
|
echo "(car (quote (0 1)))" | $mes
|
|
|
|
echo "(car '(0 1))" | $mes
|
2016-05-15 22:07:44 +00:00
|
|
|
echo "(cdr '(0 1))" | $mes
|
|
|
|
echo "(cons 0 1)" | $mes
|
|
|
|
echo "((lambda (x y) (cons x y)) 0 1)" | $mes
|
|
|
|
echo "(< 0 0)" | $mes
|
|
|
|
echo "(< 0 1)" | $mes
|
2016-07-22 15:13:51 +00:00
|
|
|
# LISP-1.5 label dropped for now
|
2016-07-19 19:37:39 +00:00
|
|
|
# echo "((label fun\
|
|
|
|
# (lambda (x) (cons x\
|
|
|
|
# (cond ((< 0 x) (fun (- x 1)))\
|
|
|
|
# (#t '())))))\
|
|
|
|
# 3)" | $mes
|
2016-07-08 16:02:06 +00:00
|
|
|
echo "'(0 . 1)" | $mes
|
|
|
|
echo "(cdr '(0 . 1))" | $mes
|
2016-07-19 16:18:27 +00:00
|
|
|
echo "(define (list . rest) rest)" | $mes
|