Hi,
In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I
try:
(apply or '(#t #f))
Error: unbound variable: or
Why (apply or '(#t #f)) does not work?
Thank you!
Jinsong
___
Chicken-users mailing list
Chicken-users@nongnu.org
'or' is a macro, and macros cannot be used as the first operand in apply.
-Dan
On Wed, May 27, 2015 at 1:25 PM, Jinsong Liang jinsongli...@gmail.com
wrote:
Hi,
In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I
try:
(apply or '(#t #f))
Error: unbound variable: or
On Wed, May 27, 2015 at 08:34:12PM +, Mario Domenech Goulart wrote:
On Wed, 27 May 2015 16:25:33 -0400 Jinsong Liang jinsongli...@gmail.com
wrote:
In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if
I try:
(apply or '(#t #f))
Error: unbound variable: or
Quoth Peter Bex on Boomtime, the 1st of Confusion:
If or were a simple procedure, it would first evaluate all its
arguments and then call the procedure.
This is also known as applicative vs. normal order; see e.g.:
https://mitpress.mit.edu/sicp/full-text/sicp/book/node85.html
Procedures are
Hi Jinsong,
On Wed, 27 May 2015 16:25:33 -0400 Jinsong Liang jinsongli...@gmail.com wrote:
In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if
I try:
(apply or '(#t #f))
Error: unbound variable: or
Why (apply or '(#t #f)) does not work?
Welcome!
`or' (*) is not a
Hi,
Thanks a lot for all of your replies!
Then is there a straightforward way to get a list of booleans ored? I
tried fold with or but it does not work either. It seems writing a loop
or a recursion for this is a little overkill.
Jinsong
On Wed, May 27, 2015 at 4:54 PM, Peter Bex
Thank you! That solved my problem!
Jinsong
On Wed, May 27, 2015 at 7:53 PM, John Cowan co...@mercury.ccil.org wrote:
Jinsong Liang scripsit:
Then is there a straightforward way to get a list of booleans ored? I
tried fold with or but it does not work either. It seems writing a
loop
or
Hello--
I'm trying to write my first real parser with comparse, but I'm running
into some difficulty with mutual recursion. Here's the problematic portion
of my code:
(define-values (dict dict-content dict-entry dict-value)
(let ()
(define dict~
(enclosed-by (is #\{)
Jinsong Liang scripsit:
Then is there a straightforward way to get a list of booleans ored? I
tried fold with or but it does not work either. It seems writing a loop
or a recursion for this is a little overkill.
You want any.
--
John Cowan http://www.ccil.org/~cowan
On Wed, May 27, 2015 at 3:46 PM, Peter Danenberg p...@roxygen.org wrote:
Quoth Peter Bex on Boomtime, the 1st of Confusion:
If or were a simple procedure, it would first evaluate all its
arguments and then call the procedure.
This is also known as applicative vs. normal order; see e.g.:
How would I convert a u8vector to a bignum?
I'd like a good large random number, and there's srfi 27 for decent random
sources, and there's 'numbers' for bignum support, but srfi-27 only produces
fixnums or u8vectors. Logically I can't imagine a bignum isn't represented under
the hood by a block
11 matches
Mail list logo