Welcome to the CHICKEN Scheme pasting service

Defining functions inside macros. added by Jubjub on Sun Mar 9 14:46:51 2014

(define-syntax define-behavior
  (syntax-rules ()
    ((define-behavior name body ...)
     (define (name actor actor)
       body ...))))

(define-behavior move-left
  `(move ,(v2 -1 (* (sin (/ (actor-x actor) 50)) 2))))

(move-left (make-actor (v2 0 0) '() '()))


> Error: unbound variable: actor

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the Makefile target to generate the bootstrap compiler of CHICKEN?
Visually impaired? Let me spell it for you (wav file) download WAV