Re: Extra . needed

2021-01-04 Thread Richard Hainsworth
Mea culpa. Super embarrassing. Comes from having to do something else for a year. Thanks Brad On 03/01/2021 18:59, Brad Gilbert wrote: You've already asked a similar question. https://stackoverflow.com/questions/54033524/perl6-correctly-passing-a-routine-into-an-object-variable

Re: Extra . needed

2021-01-03 Thread William Michels via perl6-users
Hi Richard, it doesn't appear to be a REPL-only result: user@mbook:~$ cat richard_closure.p6 class A { has &.f = -> { 'xyz' }}; my A $a .=new; say $a.f(); say $a.f.(); user@mbook:~$ raku richard_closure.p6 -> { #`(Block|140238954644472) ... } xyz user@mbook:~$ raku --version Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v

Re: Extra . needed

2021-01-03 Thread Brad Gilbert
You've already asked a similar question. https://stackoverflow.com/questions/54033524/perl6-correctly-passing-a-routine-into-an-object-variable When you call $a.f() you are getting the value in &!f which is a function. When you call $a.f().() you are getting the value in &!f, and then also calli