mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Actually add homogenous() alias.
This commit is contained in:
parent
abb9955f92
commit
3d86835752
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ function is_homogeneous(l, depth=10) =
|
||||||
!is_list(l) || l==[] ? false :
|
!is_list(l) || l==[] ? false :
|
||||||
let( l0=l[0] )
|
let( l0=l[0] )
|
||||||
[] == [for(i=[1:len(l)-1]) if( ! _same_type(l[i],l0, depth+1) ) 0 ];
|
[] == [for(i=[1:len(l)-1]) if( ! _same_type(l[i],l0, depth+1) ) 0 ];
|
||||||
|
|
||||||
|
function is_homogenous(l, depth=10) = is_homogeneous(l, depth);
|
||||||
|
|
||||||
function _same_type(a,b, depth) =
|
function _same_type(a,b, depth) =
|
||||||
(depth==0) ||
|
(depth==0) ||
|
||||||
|
|
Loading…
Reference in a new issue