Fibonacci sequence: Difference between revisions

Line 8,343:
 
=={{header|langur}}==
<syntaxhighlight lang="langur">val .fibonacci = fn(.x) { if(.x < 2: .x ; self(.x - 1) + self(.x - 2)) }
val fibonacci = fn x:if(x < 2: x ; self(x - 1) + self(x - 2))
 
writeln map .(fibonacci, series (2..20</syntaxhighlight>))
</syntaxhighlight>
 
{{out}}
1,007

edits