[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] lexgen examples
From: |
Matt Gushee |
Subject: |
[Chicken-users] lexgen examples |
Date: |
Sun, 07 Jun 2009 22:40:36 -0600 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090213) |
Hello chickeneers--
As part of trying to learn the lexgen egg, I am trying to run the
examples from the documentation, but I am getting errors.
First, I tried an example from an older version of the docs:
csi> (define a-pat (tok #\a (try char=?)))
csi> (define abc-stream (list `(() ,(string->list "abc"))))
csi> (print (a-pat abc-stream))
Error: bad argument count - received 1 but expected 2: #<procedure>
Call history:
<syntax> (print (a-pat abc-stream))
<syntax> (a-pat abc-stream)
<eval> (print (a-pat abc-stream))
<eval> (a-pat abc-stream) <--
When I run the "numpat" example from the current version, I get the same
error.
I note that the doc says:
Every combinator procedure in this library returns a procedure that
takes in a list of streams as an argument.
"A list," thus one argument, correct? So the example code is consistent
with the description.
So clearly something is broken. Is it
a) the egg code itself;
b) the docs; or
c) my installation?
Please advise, and thanks for any info.
--
Matt Gushee
: Bantam - lightweight file manager : matt.gushee.net/software/bantam/ :
: RASCL's A Simple Configuration Language : matt.gushee.net/rascl/ :
- [Chicken-users] lexgen examples,
Matt Gushee <=