mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-25 05:51:41 +02:00
update doc
This commit is contained in:
@@ -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]
|
||||
);
|
||||
|
Reference in New Issue
Block a user