You're imposing a shape on this, then getting angry at us when it turns out
to be wrong. I'm sorry nobody could read your mind ahead of time to find
out the "proper" way to shape it.

$limit sets a limit on how many words it will make. Inf means there's no
limit. Your assumption that it must be some kind of array index doesn't
make a lot of sense; this doesn't index at all, it splits at whitespace
until it's got the number of chunks you told it to make, indexing the
result is your problem. Small pieces of functionality, not "god functions"
that try to do everything you can possibly think of.

On Wed, Sep 26, 2018 at 2:57 AM Todd Chester <toddandma...@zoho.com> wrote:

> Hi All,
>
> Over on
>      https://docs.perl6.org/routine/words
> I see
>
>     multi method words(Str:D $input: $limit = Inf --> Positional)
>
> HOW IN THE WORLD did they convert `$limit = Inf` into an
> array index!?!?!
>
> https://docs.perl6.org/type/Num#Inf
> And `Inf` means a number larger than Perl can handle or Infinity.
> What does that have to do with ANYTHING!?
>
> Yours in confusion,
> -T
>
> And the worst part is that I know how to use "words" and use it
> frequently.  And the documentation is a nightmare to understand.
>
> Link to Positional:
> https://docs.perl6.org/type/Positional
>     Role for objects which support indexing them using
>     postcircumfix:«[ ]» (usually list-like objects).
>     Example types with Positional role include List,
>     Array, Range, and Buf.
>
> I like him using `Str:D $input:` rather than just `Str:D:`
> and it is more intuitive
>


-- 
brandon s allbery kf8nh
allber...@gmail.com

Reply via email to