Fibonacci sequence: Difference between revisions
Content added Content deleted
m (→Excel LAMBDA) |
|||
Line 3,980: | Line 3,980: | ||
=={{header|Excel}}== |
=={{header|Excel}}== |
||
===LAMBDA=== |
===LAMBDA=== |
||
⚫ | |||
Binding the name FIBONACCI to the following lambda in the Excel worksheet Name Manager: |
Binding the name FIBONACCI to the following lambda in the Excel worksheet Name Manager: |
||
(See [https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/ The LAMBDA worksheet function]) |
(See [https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/ The LAMBDA worksheet function]) |
||
⚫ | |||
<lang lisp>FIBONACCI |
<lang lisp>FIBONACCI |
||
=LAMBDA(n, |
=LAMBDA(n, |
||
Line 4,010: | Line 4,009: | ||
MAX(COLUMNS(xs), COLUMNS(ys)) |
MAX(COLUMNS(xs), COLUMNS(ys)) |
||
), |
), |
||
IF( |
IF(rowIndexes <= nx, |
||
rowIndexes <= nx, |
|||
INDEX(xs, rowIndexes, colIndexes), |
INDEX(xs, rowIndexes, colIndexes), |
||
INDEX(ys, rowIndexes - nx, colIndexes) |
INDEX(ys, rowIndexes - nx, colIndexes) |