Larry Wall wrote:
Yeah, I agree. How 'bout we go with something like you have to *
the actual hash (if it's the first thing) to make it look like a
list of pairs to the parser, and we can just get rid of 3 there.
I'm not sure if 3) was superflous depending on the definition of "non-pair".
Did you
On Thu, Mar 24, 2005 at 03:09:37PM -0700, Luke Palmer wrote:
: Larry Wall writes:
: > Step A: For each positional parameter, if the next supplied argument is:
: >
: > 1) a non-pair
: > 2) a pair, and this parameter is explicitly declared Pair, or
: > 3) a hash, and this parameter is de
Larry Wall writes:
> Step A: For each positional parameter, if the next supplied argument is:
>
> 1) a non-pair
> 2) a pair, and this parameter is explicitly declared Pair, or
> 3) a hash, and this parameter is declared Hash, either explicitly,
>or implicitly with a % sigil,
W
On Thu, Mar 24, 2005 at 12:58:32PM -0800, Larry Wall wrote:
: Note, the adverbial :{...} is defined as a named binding to the first
: *& parameter (or first *$ parameter if there isn't a slurpy *&), so
: it's already bound by Step C, even if it occurred later syntactically.
Hmm, that's ambiguous,
On Wed, Mar 23, 2005 at 11:08:17PM +0200, Yuval Kogman wrote:
: On Wed, Mar 23, 2005 at 11:53:06 -0800, Larry Wall wrote:
: > This seems a little backwards--I think all positionals should be bound
: > before you start binding named pairs, if currying is to be consistent with
: > "ordinary" binding.
Yuval Kogman writes:
> More!
>
> can you have several slurpy params, of the same type, which are
> assigned contiguous sequences of the thing they can slurp?
>
> foo([EMAIL PROTECTED], *%a, [EMAIL PROTECTED])
> foo(1, 2, 3, a => b, c => d, 4, 5, 6);
>
> for me that makes sense
More!
can you have several slurpy params, of the same type, which are
assigned contiguous sequences of the thing they can slurp?
foo([EMAIL PROTECTED], *%a, [EMAIL PROTECTED])
foo(1, 2, 3, a => b, c => d, 4, 5, 6);
for me that makes sense for slurpy blocks, but not anyth
On Wed, Mar 23, 2005 at 11:53:06 -0800, Larry Wall wrote:
> On Wed, Mar 23, 2005 at 05:43:52PM +0200, Yuval Kogman wrote:
> : The algorithmic approach to binding some params:
> :
> : bind invocants
> :
> : bind named parameters, and keep leftover pairs for %_
> :
> : treat nonpairs a
On Wed, Mar 23, 2005 at 08:24:48PM +0200, Yuval Kogman wrote:
: On Wed, Mar 23, 2005 at 17:43:52 +0200, Yuval Kogman wrote:
: > Hola... I've spend some time these last few days slowly getting
: > currying to work in pugs.
:
: It should also be mentioned that I made magical $?SUB et al unbind
: the
On Wed, Mar 23, 2005 at 05:43:52PM +0200, Yuval Kogman wrote:
: The algorithmic approach to binding some params:
:
: bind invocants
:
: bind named parameters, and keep leftover pairs for %_
:
: treat nonpairs as positionals, and bind them sequentially. Left
: over nonpair
On Wed, Mar 23, 2005 at 17:43:52 +0200, Yuval Kogman wrote:
> Hola... I've spend some time these last few days slowly getting
> currying to work in pugs.
It should also be mentioned that I made magical $?SUB et al unbind
the sub.
In a curried sub, should that happen?
It looks more consistent for
11 matches
Mail list logo