1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-11 09:14:39 +02:00

Merge pull request #852 from MContagious/master

Update perl6.html.markdown
This commit is contained in:
ven
2014-11-10 11:23:32 +01:00

View File

@@ -1149,7 +1149,7 @@ my @list = 1, 3, 9 ... * > 30; # you can use a predicate
# (with the Whatever Star, here). # (with the Whatever Star, here).
my @list = 1, 3, 9 ... { $_ > 30 }; # (equivalent to the above) my @list = 1, 3, 9 ... { $_ > 30 }; # (equivalent to the above)
my @fib = 1, 1, *+* ... *; # lazy infinite list of prime numbers, my @fib = 1, 1, *+* ... *; # lazy infinite list of fibonacci series,
# computed using a closure! # computed using a closure!
my @fib = 1, 1, -> $a, $b { $a + $b } ... *; # (equivalent to the above) my @fib = 1, 1, -> $a, $b { $a + $b } ... *; # (equivalent to the above)
my @fib = 1, 1, { $^a + $^b } ... *; #(... also equivalent to the above) my @fib = 1, 1, { $^a + $^b } ... *; #(... also equivalent to the above)