Actually add homogenous() alias.

This commit is contained in:
Garth Minette 2021-03-01 23:05:32 -08:00
parent abb9955f92
commit 3d86835752

View file

@ -40,6 +40,8 @@ function is_homogeneous(l, depth=10) =
let( l0=l[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) =
(depth==0) ||
(is_undef(a) && is_undef(b)) ||