1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01:00

roll back

This commit is contained in:
Justin Lin 2022-04-01 08:56:40 +08:00
parent d4c4a78d98
commit d16d419463
2 changed files with 6 additions and 14 deletions

View File

@ -19,7 +19,5 @@ new:
- lemniscate_curve?
- perlin_sphere?
- find_index: test support elem
deprecated:
rails2sections: use m_transpose

View File

@ -9,15 +9,9 @@
**/
function find_index(lt, test) =
is_function(test) ? (
let(
leng = len(lt),
indices = [for(i = 0; i < leng && !test(lt[i]); i = i + 1) undef],
leng_indices = len(indices)
)
leng_indices == leng ? -1 : leng_indices
) : (
let(found = search([test], lt)[0])
found == [] ? - 1 : found
);
let(
leng = len(lt),
indices = [for(i = 0; i < leng && !test(lt[i]); i = i + 1) undef],
leng_indices = len(indices)
)
leng_indices == leng ? -1 : leng_indices;