> On 20 Oct 2018, at 17:50, Joseph Brenner wrote:
>
> By the way, I'd really like to know what the vertical bar is here in
> front of "CORE":
>
>> for (|CORE::) .grep({ .key eq .value.^name }) .map( *.value ) -> $class {
>
> It's not the "any" junction, is it? How would that make sense her
By the way, I'd really like to know what the vertical bar is here in
front of "CORE":
> for (|CORE::) .grep({ .key eq .value.^name }) .map( *.value ) -> $class {
It's not the "any" junction, is it? How would that make sense here?
On 10/19/18, Joseph Brenner wrote:
> Okay, good enough... if
I think I see, but, just to be clear I'm planning on doing an augment
on the command-line via -M when going into the repl. Things that
happen *after* I've initialized the repl don't need to be recomposed,
because they'll happen after the augment anyway.
I also don't particularly need the methods
It is a good start, but you will only see classes that have been bound to a pad
somewhere. There are many classes that are just created on the fly that won’t
be seen, as the parents do not know about their children. For example, a
little bit contrived, but hopefully gets the point across:
Okay, good enough... if I can't slip my changes in ahead of
everything then reinitializing everything viz ^compose sounds
workable.
And so, my next question would be "Can I get a list of all
the built-in classes?" and I see brian d foy got there
a little over a year ago:
https://stackoverflow.co
See also:
https://stackoverflow.com/questions/52718499/how-to-correctly-augment-any
> On 19 Oct 2018, at 03:52, Joseph Brenner wrote:
>
> I've got another question about aug--yes, I know--ment.
>
> I've got a module ides_of_augment.pm6:
>
> use MONKEY-TYPING;
> augment class Any {
> me
pyanfar Z$ 6 'use MONKEY-TYPING; augment class Any {method hic { say "hoc"
}}; my @a = ; @a.hic'
No such method 'hic' for invocant of type 'Array'. Did you mean 'hic'?
in block at -e line 1
zsh: exit 1
pyanfar Z$ 6 'use MONKEY-TYPING; augment class Any {method hic { say "hoc"
}}; Array.^compose
I've got another question about aug--yes, I know--ment.
I've got a module ides_of_augment.pm6:
use MONKEY-TYPING;
augment class Any {
method hiccup {
say "hic!";
}
}
I would've thought it could be used in the repl like this:
perl6 -Mides_of_augment
> (Any).hiccu