[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Re: A few questions
From: |
John Cowan |
Subject: |
Re: [Chicken-users] Re: A few questions |
Date: |
Thu, 31 Jan 2008 19:40:57 -0500 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Elf scripsit:
> >(define (foo . rest) (if (= 1 (random 1)) (car rest) #f)
>
> in this case, 0. this entire expression should have been removed by the
> compiler and replaced by #f, though.
Okay, make it (random 2) then, smartass.
> additionally, this is enough information, even unevaluated, to do
> many checks at compiletime and leave only the relevant unresolved bits
> (if any) runtime checked.
By all means. But you keep saying "It's easy", when what you mean is
"Some subcases are easy."
> so the multiple-argument procedure form generalises to a nested
> single-argument procedure form.
I understand currying; it's the reciprocal claim about multiple values
I didn't and don't follow.
> if values was the first-class dual of an argument list,
[example snipped]
> if it was a dual, that resolution and application should work, methinks.
That disposes of the claim that multiple values is the dual of an argument
list, but that's not my claim: my claim is that multiple values is the
dual of multiple arguments, and neither one needs a list to implement
unless the number of arguments or values is indefinite. You can pass
arguments in registers (broadly construed), and you can pass back values
in registers too.
> values isnt a first-class object, its just a hack.
Only in the sense that passing multiple arguments rather than allowing
just one (a list, not a curried function) is a hack. If it's a hack,
it's pretty basic to Scheme and most other languages (excepting ML,
Haskell, and Q).
> its why the most common form of the consumer lambda-list in
> call-with-values is just a rest arg. :)
Really? I'd expect that, since most multiple-value-returning procedures
return a definite number of values, that a proper argument list would
be the most common case. It's certainly the case that CL provides the
most support for.
(The below was randomly chosen without reference to the message I write
or the one it's responding to.)
--
John Cowan address@hidden http://ccil.org/~cowan
If I have seen farther than others, it is because I am surrounded by dwarves.
--Murray Gell-Mann
- Re: [Chicken-users] Re: A few questions (oops), (continued)
- Re: [Chicken-users] Re: A few questions (oops), Kon Lovett, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions,
John Cowan <=
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Graham Fawcett, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Zbigniew, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Elf, 2008/01/31
- Re: [Chicken-users] Re: A few questions, John Cowan, 2008/01/31
- Re: [Chicken-users] Re: A few questions, Kon Lovett, 2008/01/31