1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-21 22:05:27 +02: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? - lemniscate_curve?
- perlin_sphere? - perlin_sphere?
- find_index: test support elem
deprecated: deprecated:
rails2sections: use m_transpose rails2sections: use m_transpose

View File

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