Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (20 sloc) 281 Bytes
#! /usr/bin/perl
use Modern::Perl;
use YAML;
use List::AllUtils qw/ sum /;
sub make_fib {
my $x = shift;
sub {
push @$x, sum @$x;
shift @$x;
}
}
my @seq = map { make_fib $_ }
( [1,1]
, [2,4]
, [2,16]
);
for (1..15) {
say join "\t"
, map { $_->() } @seq
}