Fibonacci sequence: Difference between revisions

Content added Content deleted
Line 3,980: Line 3,980:
=={{header|Excel}}==
=={{header|Excel}}==
===LAMBDA===
===LAMBDA===
{{Works with|Office 365 Betas 2021}}


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])

{{Works with|Office 365 Betas 2021}}
<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)