1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-16 03:34:42 +02:00

refactor: is_undef(combine)

This commit is contained in:
Justin Lin
2022-04-18 16:35:40 +08:00
parent 493645bc7e
commit ed1027f9de

View File

@@ -8,9 +8,14 @@
* *
**/ **/
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]) [
combine([for(j = [0:end_lts]) lts[j][i]]) for(i = [0:len(lts[0]) - 1])
]; [for(j = [0:end_lts]) lts[j][i]]
] :
[
for(i = [0:len(lts[0]) - 1])
combine([for(j = [0:end_lts]) lts[j][i]])
];