]> git.jsancho.org Git - gacela.git/blobdiff - src/utils.scm
Meshes located at video module and new game loop procedure returning game elements
[gacela.git] / src / utils.scm
index eb20531fdc90680abfcd224e942d81afd510af43..ed09712d9a990531d9e9daecdc81e1131596aed1 100644 (file)
@@ -19,7 +19,9 @@
   #:export (use-cache-with
            arguments-calling
            arguments-apply
-           bound?))
+           bound?
+           names-arguments
+           make-producer))
 
 
 ;;; Cache for procedures
            (keyword-arguments-apply args values)
            (rest-arguments-apply args values))))
 
+(define (names-arguments args)
+  (map (lambda (x) (if (list? x) (car x) x))
+       (filter (lambda (x) (not (keyword? x)))
+              (pair-to-list args))))
+
 
 ;;; Continuations and coroutines
 
     (if resume
         (resume real-send)
         (body send))))
+
+
+;;; Miscellaneous
+
+(define (pair-to-list pair)
+  (cond ((null? pair) '())
+       ((not (pair? pair)) (list pair))
+       (else (cons (car pair) (pair-to-list (cdr pair))))))