test out profiling

This commit is contained in:
Felix Brendel
2019-08-30 01:30:24 +02:00
parent aea0e9dc94
commit 6c80382cd0
30 changed files with 564 additions and 123 deletions
+1 -14
View File
@@ -120,7 +120,7 @@ condition is false."
`(,append-map (lambda (,(first body)) (list ,(rec (rest (rest (rest body)))))) ,(first (rest (rest body)))))
((= (first body) 'if)
`(when ,(first (rest body)) ,(rec (rest (rest body)))))
((= (first body) 'yield)
((= (first (rest body)) 'yield)
(first (rest body)))
(else (error "Not a do-able expression"))))
@@ -158,19 +158,6 @@ ithe sequence as arguemens."
exports))))
;; (define-syntax (define-package name :rest body)
;; `(define ,(string->symbol (concat-strings (symbol->string name) "->"))
;; ((lambda ()
;; @body
;; (set-type
;; (special-lambda (:rest args)
;; (let ((op (first args))
;; (args (rest args)))
;; (if (callable? (eval op))
;; (apply op args)
;; (eval op))))
;; :package)))))
(define (null? x)
"Checks if the argument is =nil=."
(= x ()))
+1 -2
View File
@@ -3,8 +3,7 @@
(define (make-counter)
(let ((var 0))
(lambda ()
(mutate var (+ 1 var))
var)))
(set! var (+ 1 var)))))
(define counter1 (make-counter))
+1 -1
View File
@@ -1,4 +1,4 @@
(define (make-counter) (let ((var 0)) (lambda () (mutate var (+ 1 var)) var)))
(define (make-counter) (let ((var 0)) (lambda () (set! var (+ 1 var)))))
(define counter1 (make-counter))