Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
45
Task/Sierpinski-triangle/Excel/sierpinski-triangle-1.excel
Normal file
45
Task/Sierpinski-triangle/Excel/sierpinski-triangle-1.excel
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
sierpinskiTriangle
|
||||
=LAMBDA(c,
|
||||
LAMBDA(n,
|
||||
IF(0 = n,
|
||||
c,
|
||||
LET(
|
||||
prev, sierpinskiTriangle(c)(n - 1),
|
||||
|
||||
APPENDROWS(
|
||||
sierpCentered(prev)
|
||||
)(
|
||||
sierpDoubled(prev)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
sierpCentered
|
||||
=LAMBDA(grid,
|
||||
LET(
|
||||
nRows, ROWS(grid),
|
||||
padding, IF(
|
||||
SEQUENCE(nRows, nRows, 1, 1),
|
||||
" "
|
||||
),
|
||||
|
||||
APPENDCOLS(
|
||||
APPENDCOLS(padding)(grid)
|
||||
)(padding)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
sierpDoubled
|
||||
=LAMBDA(grid,
|
||||
APPENDCOLS(
|
||||
APPENDCOLS(grid)(
|
||||
IF(SEQUENCE(ROWS(grid), 1, 1, 1),
|
||||
" "
|
||||
)
|
||||
)
|
||||
)(grid)
|
||||
)
|
||||
59
Task/Sierpinski-triangle/Excel/sierpinski-triangle-2.excel
Normal file
59
Task/Sierpinski-triangle/Excel/sierpinski-triangle-2.excel
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
APPENDCOLS
|
||||
=LAMBDA(xs,
|
||||
LAMBDA(ys,
|
||||
LET(
|
||||
nx, COLUMNS(xs),
|
||||
colIndexes, SEQUENCE(1, nx + COLUMNS(ys)),
|
||||
rowIndexes, SEQUENCE(MAX(ROWS(xs), ROWS(ys))),
|
||||
|
||||
IFERROR(
|
||||
IF(nx < colIndexes,
|
||||
INDEX(ys, rowIndexes, colIndexes - nx),
|
||||
INDEX(xs, rowIndexes, colIndexes)
|
||||
),
|
||||
NA()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
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()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
gridString
|
||||
=LAMBDA(grid,
|
||||
LET(
|
||||
ixCol, SEQUENCE(ROWS(grid), 1, 1, 1),
|
||||
|
||||
CHAR(10) & CONCAT(
|
||||
APPENDCOLS(
|
||||
IF(ixCol, " ")
|
||||
)(
|
||||
APPENDCOLS(grid)(
|
||||
IF(ixCol, CHAR(10))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue