A question on AND

2023-06-29 Thread ToddAndMargo via perl6-users
Hi All, This gets the finger wagged at me for a "Nil" when @*ARGS.elems equals zero: if @*ARGS.elems > 0 && "@*ARGS[0]".lc eq "debug" {...} I have to do this instead: if @*ARGS.elems > 0 { if "@*ARGS[0]".lc eq "debug" {...} } Do I misunderstand something? In an AND, is not the

Re: Strange behavior with sequence of functions

2023-06-29 Thread William Michels via perl6-users
> On Jun 29, 2023, at 12:21, Sean McAfee wrote: > > I was trying to construct a sequence of functions using the sequence > operator, and encountered some very puzzling behavior. I was able to reduce > it down to some very simple examples. > > [1] > my @s = +*, -> { } ... * > [...] > [2]

Strange behavior with sequence of functions

2023-06-29 Thread Sean McAfee
I was trying to construct a sequence of functions using the sequence operator, and encountered some very puzzling behavior. I was able to reduce it down to some very simple examples. [1] > my @s = +*, -> { } ... * [...] [2] > @s[0] Too few positionals passed; expected 1 argument but got 0 in