Vadim Belman wrote:
> It's not about gist truncating long lists. After all, when it does so it
> ends the output with triple dot.
>
> Yet nobody spotted that not every methods in the list are represented by
> their names. Alongside with something like 'elems' there are many
> 'Method+{is-nodal}.n
It's not about gist truncating long lists. After all, when it does so it ends
the output with triple dot.
Yet nobody spotted that not every methods in the list are represented by their
names. Alongside with something like 'elems' there are many
'Method+{is-nodal}.new' entries. This is due to `i
Gianni Ceccarelli wrote:
>If you grep the list itself, instead of its gist::
>
> $ raku -e 'Set.^methods.map(*.name).grep(/keys/)>>.say'
> keys
Yes, you're right. That's all there was to it.
On 2021-02-16 Joseph Brenner wrote:
> But I don't see them in the list from .^methods:
>
> say $s.^methods;
>
> say so $s.^methods.gist.grep(/<>/); # False
``say`` calls ``.gist``, which produces a *truncated* string
representation for long lists::
$ raku -e 'say (^1000).List'
(
I'm getting this on Rakudo blead.
$ raku -v
Welcome to Rakudo(tm) v2020.12-129-g291cc5f39.
Implementing the Raku(tm) programming language v6.d.
Built on MoarVM version 2020.12-100-gc93531608.
$ raku -e'my $s = set 2, 4, 6; say $s.^methods>>.name.sort;'
(ACCEPTS ASSIGN-KEY AT-KEY BUILDALL Bag BagHa
Set objects have Associative methods:
my $s = set 2, 4, 6;
say $s.keys; # (4 2 6)
But I don't see them in the list from .^methods:
say $s.^methods;
# (menu default pick minpairs Setty grabpairs SET-SELF raku
Method+{is-nodal}.new Real Baggy iterator keyof Method+{is-nodal}.new
Method+{