Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
28
Task/Sierpinski-carpet/Excel/sierpinski-carpet-1.excel
Normal file
28
Task/Sierpinski-carpet/Excel/sierpinski-carpet-1.excel
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
SHOWBLOCKS
|
||||
=LAMBDA(xs,
|
||||
IF(0 <> xs, "█", " ")
|
||||
)
|
||||
|
||||
|
||||
SIERPCARPET
|
||||
=LAMBDA(n,
|
||||
APPLYN(n)(
|
||||
SIERPWEAVE
|
||||
)(1)
|
||||
)
|
||||
|
||||
|
||||
SIERPWEAVE
|
||||
=LAMBDA(xs,
|
||||
LET(
|
||||
triple, REPLICATECOLS(3)(xs),
|
||||
gap, LAMBDA(x, IF(x, 0, 0))(xs),
|
||||
middle, APPENDCOLS(
|
||||
APPENDCOLS(xs)(gap)
|
||||
)(xs),
|
||||
|
||||
APPENDROWS(
|
||||
APPENDROWS(triple)(middle)
|
||||
)(triple)
|
||||
)
|
||||
)
|
||||
75
Task/Sierpinski-carpet/Excel/sierpinski-carpet-2.excel
Normal file
75
Task/Sierpinski-carpet/Excel/sierpinski-carpet-2.excel
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
APPENDCOLS
|
||||
=LAMBDA(xs,
|
||||
LAMBDA(ys,
|
||||
LET(
|
||||
nx, COLUMNS(xs),
|
||||
ny, COLUMNS(ys),
|
||||
colIndexes, SEQUENCE(1, nx + ny),
|
||||
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()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
APPLYN
|
||||
=LAMBDA(n,
|
||||
LAMBDA(f,
|
||||
LAMBDA(x,
|
||||
IF(0 < n,
|
||||
APPLYN(n - 1)(f)(
|
||||
f(x)
|
||||
),
|
||||
x
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
REPLICATECOLS
|
||||
=LAMBDA(n,
|
||||
LAMBDA(xs,
|
||||
LET(
|
||||
nCols, COLUMNS(xs),
|
||||
h, n * nCols,
|
||||
ixs, SEQUENCE(ROWS(xs), h, 0, 1),
|
||||
|
||||
INDEX(
|
||||
xs,
|
||||
1 + QUOTIENT(ixs, h),
|
||||
1 + MOD(ixs, nCols)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue