Show
Ignore:
Timestamp:
07/31/08 05:41:13 (5 months ago)
Author:
Chuck.Esterbrook
Message:

Added new all and any unary operators that take something enumerable (such as a list, set or generator) and return a boolean (true or false) indicating if all or any of the elements are true.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Tests/500-dynamic/104-dynamic-ops.cobra

    r1474 r1564  
    175175                xq = 'aoeu' 
    176176                assert not not xq 
     177 
     178                t as dynamic = [1, 2, 3] 
     179                assert all t 
     180                assert any t 
     181                t.add(0) 
     182                assert not all t 
     183                assert any t 
     184                t = [0] 
     185                assert not all t 
     186                assert not any t 
     187                t.clear 
     188                assert all t 
     189                assert not any t