Using ftb print and updated the doc generation
This commit is contained in:
+18
-7
@@ -1,10 +1,3 @@
|
||||
;; (remove_when_double_free_is_fixed)
|
||||
;; (remove_when_double_free_is_fixed_2)
|
||||
;; (define (kk (:key ()))
|
||||
;; ())
|
||||
|
||||
;; (kk)
|
||||
|
||||
(define pair cons)
|
||||
(define first car)
|
||||
(define rest cdr)
|
||||
@@ -117,7 +110,25 @@ condition is false."
|
||||
(define unzipped (unzip bindings))
|
||||
`((,lambda ,(car unzipped) ,@body) ,@(car (cdr unzipped))))
|
||||
|
||||
(define-macro (while cond . body)
|
||||
(let ((gs (gensym)))
|
||||
`(,let ((,gs ()))
|
||||
(,set! ,gs
|
||||
(,lambda ()
|
||||
(,when ,cond
|
||||
,@body
|
||||
(,gs))))
|
||||
(,gs))))
|
||||
|
||||
(define-macro (cond . clauses)
|
||||
"Example usage:
|
||||
(define (prime? x)
|
||||
(define (rec i)
|
||||
(cond ((> i (** x 0.5)) t)
|
||||
((= 0 (% x i)) ())
|
||||
(else (rec (+ 1 i))))
|
||||
)
|
||||
(rec 2))"
|
||||
(define (rec clauses)
|
||||
(if (= () clauses)
|
||||
()
|
||||
|
||||
Reference in New Issue
Block a user