[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Check whether the elements of a list are all true



Yes! Check .every and its friend .any

Many thanks to the designer-developers who added these, I love them

Cheers
eddi




--
https://soundcloud.com/all-n4tural
https://alln4tural.bandcamp.com


On 24/12/2019, 11:13 marcello.lussana@xxxxxxxxxxxx wrote:
hi,

is there a class method to check whether all elements of a list are all
true?

thank you!
Marcello

=======

c = [false, true, false];
d = [true, true, true];

// I imagine something like:
d.allTrue;
=> true
c.allTrue;
=> false

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/
_______________________________________________ sc-users mailing list info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx archive: https://listarc.bham.ac.uk/marchives/sc-users/ search: https://listarc.bham.ac.uk/lists/sc-users/search/