From: Javier Sancho Date: Sat, 21 Apr 2012 06:15:25 +0000 (+0200) Subject: A new way of instantiating mobs. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=35174d33b2c89c7005305f6a50684658203d3bad;hp=553aea23f6f4d69950d31c3d51f20ad918de8a36;p=gacela.git A new way of instantiating mobs. --- diff --git a/src/gacela.scm b/src/gacela.scm index 1c3855b..2a440b2 100644 --- a/src/gacela.scm +++ b/src/gacela.scm @@ -357,7 +357,7 @@ (fun-name (get-mob-function-name name))) `(begin (define-mob-function ,(cons fun-name attr) ,@body) - (define ,(string->symbol (string-concatenate (list "make-" (symbol->string name)))) + (define ,name (lambda* ,(if (null? attr) '() `(#:key ,@attr)) (the-mob ',name (list ,@(map (lambda (a) `(cons ',(car a) ,(car a))) attr)) ,fun-name))))))