Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Fibonacci-sequence/Excel/fibonacci-sequence-1.excel
Normal file
12
Task/Fibonacci-sequence/Excel/fibonacci-sequence-1.excel
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
FIBONACCI
|
||||
=LAMBDA(n,
|
||||
APPLYN(n - 2)(
|
||||
LAMBDA(xs,
|
||||
APPENDROWS(xs)(
|
||||
SUM(
|
||||
LASTNROWS(2)(xs)
|
||||
)
|
||||
)
|
||||
)
|
||||
)({1;1})
|
||||
)
|
||||
57
Task/Fibonacci-sequence/Excel/fibonacci-sequence-2.excel
Normal file
57
Task/Fibonacci-sequence/Excel/fibonacci-sequence-2.excel
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
APPENDROWS
|
||||
=LAMBDA(xs,
|
||||
LAMBDA(ys,
|
||||
LET(
|
||||
nx, ROWS(xs),
|
||||
rowIndexes, SEQUENCE(nx + ROWS(ys)),
|
||||
colIndexes, SEQUENCE(
|
||||
1,
|
||||
MAX(COLUMNS(xs), COLUMNS(ys))
|
||||
),
|
||||
|
||||
IFERROR(
|
||||
IF(rowIndexes <= nx,
|
||||
INDEX(xs, rowIndexes, colIndexes),
|
||||
INDEX(ys, rowIndexes - nx, colIndexes)
|
||||
),
|
||||
NA()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
APPLYN
|
||||
=LAMBDA(n,
|
||||
LAMBDA(f,
|
||||
LAMBDA(x,
|
||||
IF(0 < n,
|
||||
APPLYN(n - 1)(f)(
|
||||
f(x)
|
||||
),
|
||||
x
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
LASTNROWS
|
||||
=LAMBDA(n,
|
||||
LAMBDA(xs,
|
||||
LET(
|
||||
nRows, COUNTA(xs),
|
||||
x, MIN(nRows, n),
|
||||
|
||||
IF(0 < n,
|
||||
INDEX(
|
||||
xs,
|
||||
SEQUENCE(
|
||||
x, 1,
|
||||
1 + nRows - x, 1
|
||||
)
|
||||
),
|
||||
NA()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
15
Task/Fibonacci-sequence/Excel/fibonacci-sequence-3.excel
Normal file
15
Task/Fibonacci-sequence/Excel/fibonacci-sequence-3.excel
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
FIBONACCI2
|
||||
=LAMBDA(n,
|
||||
INDEX(
|
||||
FOLDL(
|
||||
LAMBDA(ab,
|
||||
LAMBDA(_,
|
||||
APPEND(INDEX(ab, 2))(SUM(ab))
|
||||
)
|
||||
)
|
||||
)({0;1})(
|
||||
ENUMFROMTO(1)(n)
|
||||
),
|
||||
1
|
||||
)
|
||||
)
|
||||
61
Task/Fibonacci-sequence/Excel/fibonacci-sequence-4.excel
Normal file
61
Task/Fibonacci-sequence/Excel/fibonacci-sequence-4.excel
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
APPEND
|
||||
=LAMBDA(xs,
|
||||
LAMBDA(ys,
|
||||
LET(
|
||||
nx, ROWS(xs),
|
||||
rowIndexes, SEQUENCE(nx + ROWS(ys)),
|
||||
colIndexes, SEQUENCE(
|
||||
1,
|
||||
MAX(COLUMNS(xs), COLUMNS(ys))
|
||||
),
|
||||
IF(rowIndexes <= nx,
|
||||
INDEX(xs, rowIndexes, colIndexes),
|
||||
INDEX(ys, rowIndexes - nx, colIndexes)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
ENUMFROMTO
|
||||
=LAMBDA(a,
|
||||
LAMBDA(z,
|
||||
SEQUENCE(1 + z - a, 1, a, 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
FOLDL
|
||||
=LAMBDA(op,
|
||||
LAMBDA(a,
|
||||
LAMBDA(xs,
|
||||
IF(
|
||||
2 > ROWS(xs),
|
||||
op(a)(xs),
|
||||
FOLDL(op)(
|
||||
op(a)(
|
||||
HEAD(xs)
|
||||
)
|
||||
)(
|
||||
TAIL(xs)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
HEAD
|
||||
=LAMBDA(xs,
|
||||
INDEX(xs, 1, SEQUENCE(1, COLUMNS(xs)))
|
||||
)
|
||||
|
||||
|
||||
TAIL
|
||||
=LAMBDA(xs,
|
||||
INDEX(
|
||||
xs,
|
||||
SEQUENCE(ROWS(xs) - 1, 1, 2, 1),
|
||||
SEQUENCE(1, COLUMNS(xs))
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue