-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self-referential declarations. #2105
Comments
From @masak<TimToady> I think I've found a binding bug. http://wall.org/~larry/hamming.p6 #!/usr/local/bin/perl6 #hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map sub infix:<merge> (@x [$x, *@xtail], @y [$y,*@ytail]) { my @hamming := (1, (@hamming X* 2) merge (@hamming X* 3) merge (@hamming X* 5)); say ~@hamming[^20]; <masak> ooh, the Hamming sequence! |
From @moritzThe code as-is will never work, because at some point it'll pass an Here is an updated version (see also https://gist.github.com/1704555 ) multi sub infix:<merge> (@ [], @y) is default { @y }; my @hamming := (1, (@hamming X* 2) merge (@hamming X* 3) merge (@hamming say ~@hamming[^20]; output on current rakudo: 1 |
The RT System itself - Status changed from 'new' to 'open' |
From @cokeOn Mon Jan 30 06:13:36 2012, moritz wrote:
11:17 < [Coke]> moritz, TimToady: what is the expected output of the last bit |
From @cokeOn Tue Sep 02 08:21:59 2014, coke wrote:
Both GLR & NOM now complain that you can't use @hamming to declare @hamming. |
Migrated from rt.perl.org#77474 (status was 'open')
Searchable as RT77474$
The text was updated successfully, but these errors were encountered: