chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Help with and-let* please.


From: Robin Lee Powell
Subject: [Chicken-users] Help with and-let* please.
Date: Sat, 3 Feb 2007 14:33:40 -0800
User-agent: Mutt/1.5.13 (2006-08-11)

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>

- -----------

-- 
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
Reason #237 To Learn Lojban: "Homonyms: Their Grate!"
Proud Supporter of the Singularity Institute - http://singinst.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]