[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] amb egg bug/confusion
From: |
John Cowan |
Subject: |
Re: [Chicken-users] amb egg bug/confusion |
Date: |
Wed, 14 Mar 2012 21:04:42 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Alan Post scripsit:
> (pretty-print (let ((s (amb 0 1 2))) (amb-collect s)))
You're assuming that the result of amb is an "amb object" that you
can bind to a variable, but that's not how amb works. It provides
a non-linear flow of control in the evaluation of its arguments, but
once it terminates, it returns the single value produced by the first
non-failing argument, in this case 0.
--
Go, and never darken my towels again! John Cowan
--Rufus T. Firefly http://ccil.org/~cowan
- [Chicken-users] amb egg bug/confusion, Alan Post, 2012/03/14
- Re: [Chicken-users] amb egg bug/confusion, Thomas Chust, 2012/03/14
- Re: [Chicken-users] amb egg bug/confusion, Alan Post, 2012/03/19
- Re: [Chicken-users] amb egg bug/confusion, Matt Welland, 2012/03/19
- Re: [Chicken-users] amb egg bug/confusion, Jörg F . Wittenberger, 2012/03/19
- Re: [Chicken-users] amb egg bug/confusion, Alan Post, 2012/03/19
- Re: [Chicken-users] amb egg bug/confusion, Jörg F . Wittenberger, 2012/03/19
- Re: [Chicken-users] amb egg bug/confusion, Alan Post, 2012/03/19
Re: [Chicken-users] amb egg bug/confusion,
John Cowan <=