Continued fraction: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: simplification + neglecting extra credit) |
m (→{{header|Perl 6}}: forgot to remove 'take') |
||
Line 737: | Line 737: | ||
<lang Perl 6>sub infix:<⚬>(&f, &g) { -> $x { &f(&g($x)) } } |
<lang Perl 6>sub infix:<⚬>(&f, &g) { -> $x { &f(&g($x)) } } |
||
sub continued-fraction(@a, @b) { |
sub continued-fraction(@a, @b) { |
||
map { $_(Inf) }, [\⚬] map { |
map { $_(Inf) }, [\⚬] map { @a[$_] + @b[$_] / * }, 0 .. * |
||
} |
} |
||