Re: words[] question

2018-09-26 Thread Brandon Allbery
We really are not communicating at all, are we? It says "--> Positional". Positional is a role specifying what to do with []. Positional is what knows what to do with [], so words() and lines() and everything else that produces a Positional doesn't have to know that. This is more or less the

Re: words[] question

2018-09-26 Thread ToddAndMargo
On 9/26/18 2:40 PM, Brandon Allbery wrote: Do you really think every function that produces a "list" has built into it secret knowledge of how you would index a list? They just produce a "Positional" or "Seq" or "List", etc. and *those* know what to do with []. The function doesn't even need

Re: words[] question

2018-09-26 Thread ToddAndMargo
On 9/26/18 6:04 AM, Brian Duggan wrote: On Tuesday, September 25, Todd Chester wrote: Not to ask too obvious a question, but why does words use a [] instead of a () ? ... I am confused as to when to use [] and when to use () with a method. If a method is called without arguments, the () can

Re: words[] question

2018-09-26 Thread Brandon Allbery
You're still assuming they're the "same thing"in some sense. The type of the () postfix operator says it applies to a function or method (more specifically, to something that supports the Callable role), thus to "words" itself. The type of the [] postfix operator says it applies to something that

Re: words[] question

2018-09-26 Thread ToddAndMargo
On 9/26/18 11:42 AM, Larry Wall wrote: On Wed, Sep 26, 2018 at 01:16:26PM -0400, Parrot Raiser wrote: : Would it be correct to say: : [ ] aka square brackets, always surround the subscript of an array or : list, i.e. here "n: is an integer, [n] always means the nth item, : while : ( ), round

Re: words[] question

2018-09-26 Thread Larry Wall
On Wed, Sep 26, 2018 at 01:16:26PM -0400, Parrot Raiser wrote: : Would it be correct to say: : [ ] aka square brackets, always surround the subscript of an array or : list, i.e. here "n: is an integer, [n] always means the nth item, : while : ( ), round brackets or parentheses, separate and

Re: words[] question

2018-09-26 Thread Parrot Raiser
Would it be correct to say: [ ] aka square brackets, always surround the subscript of an array or list, i.e. here "n: is an integer, [n] always means the nth item, while ( ), round brackets or parentheses, separate and group items to control processing order, and identify subroutine calls,

Re: words[] question

2018-09-26 Thread Brian Duggan
On Tuesday, September 25, Todd Chester wrote: > Not to ask too obvious a question, but why does words use a [] > instead of a () ? > ... > I am confused as to when to use [] and when to use () with a method. If a method is called without arguments, the () can be omitted. "a man a plan a

Re: words[] question

2018-09-26 Thread Todd Chester
On 09/25/2018 11:37 PM, Todd Chester wrote: How about my `Str:D $input:` question? That chat line just told me it is an optional way of writing it. I like it!

Re: words[] question

2018-09-26 Thread Todd Chester
El mié., 26 sept. 2018 a las 8:27, Todd Chester (>) escribió: >> El mié., 26 sept. 2018 a las 6:12, Todd Chester (mailto:toddandma...@zoho.com> >> >>) escribió: >> >>

Re: words[] question

2018-09-26 Thread Todd Chester
El mié., 26 sept. 2018 a las 6:12, Todd Chester (>) escribió: Hi All, https://docs.perl6.org/routine/words is no help Not to ask too obvious a question, but why does words use a [] instead of a () ? On 09/25/2018 10:38 PM, JJ Merelo

words[] question

2018-09-25 Thread Todd Chester
Hi All, https://docs.perl6.org/routine/words is no help Not to ask too obvious a question, but why does words use a [] instead of a () ? $ ls -al Win10_1803_English_x64.dd -rwxrwxrwx. 1 todd root 7927234560 May 9 21:14 Win10_1803_English_x64.dd $ ls -al Win10_1803_English_x64.dd | p6 'my