projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/lisp: Rename progn to begin
[fw/altos]
/
src
/
lisp
/
ao_lisp_const.lisp
diff --git
a/src/lisp/ao_lisp_const.lisp
b/src/lisp/ao_lisp_const.lisp
index 861a4fc80eed91314a76453f63528fef4d21340e..f8a709799ff5b05b580246bc176910b4345545d2 100644
(file)
--- a/
src/lisp/ao_lisp_const.lisp
+++ b/
src/lisp/ao_lisp_const.lisp
@@
-25,7
+25,7
@@
(set (quote define) (macro (name val rest)
(list
(set (quote define) (macro (name val rest)
(list
- '
prog
n
+ '
begi
n
(list
'set
(list 'quote name)
(list
'set
(list 'quote name)
@@
-159,9
+159,6
@@
(odd? 3)
(odd? -1)
(odd? 3)
(odd? -1)
-(define exact? number?)
-(defun inexact? (x) #f)
-
; (if <condition> <if-true>)
; (if <condition> <if-true> <if-false)
; (if <condition> <if-true>)
; (if <condition> <if-true> <if-false)
@@
-523,6
+520,26
@@
'(54 0 37 -3 245 19))
#t))
'(54 0 37 -3 245 19))
#t))
+(define repeat (macro (count rest)
+ (list
+ let
+ (list
+ (list '__count__ count))
+ (append
+ (list
+ while
+ (list
+ <=
+ 0
+ (list
+ set!
+ '__count__
+ (list
+ -
+ '__count__
+ 1))))
+ rest))))
+
;(define number->string (lexpr (arg opt)
; (let ((base (if (null? opt) 10 (car opt)))
;
;(define number->string (lexpr (arg opt)
; (let ((base (if (null? opt) 10 (car opt)))
;