(define-module (gacela utils)
#:use-module (ice-9 session)
- #:export (use-cache-with
- procedure-header))
+ #:export (use-cache-with))
;;; Cache for procedures
(set! res (apply proc param))
(hash-set! cache key res)
res))))))
-
-
-;;; Retrive header definition of a procedure
- (define (procedure-header proc)
- (let* ((args (procedure-arguments proc))
- (name (procedure-name proc))
- (required (cdar args)))
- (cons name required)))
(mesh 'rotate 0 0 (car params)))
mesh)
+
+;;; Primitives
+
+(define (basic proc)
+ ((@ (system vm program) program-lambda-list) proc))
+
(define-macro (define-primitives . symbols)
(cond ((null? symbols)
`#t)