1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-25 05:51:41 +02:00

update doc

This commit is contained in:
Justin Lin
2022-04-06 17:44:11 +08:00
parent adf07c5da8
commit d0474ed757
48 changed files with 253 additions and 236 deletions

View File

@@ -16,26 +16,21 @@ returns a new list with all sub-list elements concatenated into it recursively u
vt = [[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]];
assert(
flat([1, 2, [3, 4]]) ==
[1, 2, 3, 4]
flat([1, 2, [3, 4]]) == [1, 2, 3, 4]
);
assert(
flat([[1, 2], [3, 4]]) ==
[1, 2, 3, 4]
flat([[1, 2], [3, 4]]) == [1, 2, 3, 4]
);
assert(
flat([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]]) ==
[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
flat([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]]) == [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
);
assert(
flat([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]], 2) ==
[[1, 2], [3, 4], [5, 6], [7, 8]]
flat([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]], 2) == [[1, 2], [3, 4], [5, 6], [7, 8]]
);
assert(
flat([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]], 3) ==
[1, 2, 3, 4, 5, 6, 7, 8]
flat([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]]], 3) == [1, 2, 3, 4, 5, 6, 7, 8]
);