IsBlist( obj )
IsBlist
returns true
if obj, which may be an object of arbitrary
type, is a boolean list and false
otherwise. A boolean list is a list
that has no holes and contains only true
and false
.
gap> IsBlist( [ true, true, false, false ] ); true gap> IsBlist( [] ); true gap> IsBlist( [false,,true] ); false # has holes gap> IsBlist( [1,1,0,0] ); false # contains not only boolean values gap> IsBlist( 17 ); false # is not even a list
GAP 3.4.4