mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-16 11:44:50 +02:00
refactor: is_undef(combine)
This commit is contained in:
@@ -8,8 +8,13 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
function zip(lts, combine = function(elems) elems) =
|
function zip(lts, combine) =
|
||||||
let(end_lts = len(lts) - 1)
|
let(end_lts = len(lts) - 1)
|
||||||
|
is_undef(combine) ?
|
||||||
|
[
|
||||||
|
for(i = [0:len(lts[0]) - 1])
|
||||||
|
[for(j = [0:end_lts]) lts[j][i]]
|
||||||
|
] :
|
||||||
[
|
[
|
||||||
for(i = [0:len(lts[0]) - 1])
|
for(i = [0:len(lts[0]) - 1])
|
||||||
combine([for(j = [0:end_lts]) lts[j][i]])
|
combine([for(j = [0:end_lts]) lts[j][i]])
|
||||||
|
Reference in New Issue
Block a user