[plt-scheme] Lambda in a list... am I doing something wrong?
Timothy McDowell wrote:
> I'm trying to write a little interactive fiction, and I have a setup like
> this:
> (define commands
> '(
> ("look" (lambda () (display "test")))))
>
>
Try (define commands (list (list "look" (lambda () (display "test")))))
> The response I get from trying ((cdr (car commands))):
> procedure application: expected procedure, given: ((lambda () (display
> "test"))) (no arguments)
>
> Can someone explain to me what I am doing wrong?
>
> -- Thanks,
> --Timothy.
>
>
> ------------------------------------------------------------------------
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>