I'm trying to work from http://srfi.schemers.org/srfi-2/srfi-2.html
because the Chicken site is down, and I can't make and-let* work for
me at all. I've shown two attempts below.
In the chicken source, in csi.scm, there's:
(and-let* ([(fx>= a len)]
[o (fxmod len 16)]
[(not (fx= o 0))] )
{stuff}
which looks like it's trying to do something like my first example
below. As you can see, though, mine doesn't actually work in any
useful sense.
The goal, in case it's subtle, is to have and-let* return #f after
the display of "foo.\n".
-Robin
- -----------
(define land
(and-let*
(
(begin (display "foo.\n") #t)
((= 2 1))
(begin (display "bar.\n") #t)
)
(begin
(display "Still here.\n"))))
(display "land: ")
(write land)
(display "\n")
- ---
$ /tmp/land
foo.
Error: call of non-procedure: #<unspecified>
- -----------
- -----------
(define land
(and-let*
(
(begin (display "foo.\n") #t)
(= 2 1)
(begin (display "bar.\n") #t)
)
(begin
(display "Still here.\n"))))
(display "land: ")
(write land)
(display "\n")
- ---
address@hidden> /tmp/land
foo.
bar.
Still here.
Error: call of non-procedure: #<unspecified>
- -----------