Nice TWiki > Dev > StandardLibraryMethods (r1.2 vs. r1.3) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
 <<O>>  Difference Topic StandardLibraryMethods (r1.3 - 08 Aug 2003 - ArjanB)
Added:
>
>

<nop>
Changed:
<
<

>
>

<nop>
Added:
>
>

<nop>
Changed:
<
<

>
>

<nop>
Added:
>
>

/**
  Count the number of elements for which test returns true
*/
<T> int count (Collection<T>, T->boolean test);

/**
  @return true if all boolean in the list are true otherwise returns false
*/
boolean and (List<boolean>);

/**
  @return true if the test returns true for all elements in the Collection otherwise return false
*/
<T> boolean all (Collection<T>, T->boolean test);

<T> T max(Collection<T> coll (T,T)->int comparator) requires !coll.isEmpty()

<T> T min(Collection<T> coll (T,T)->int comparator) requires !coll.isEmpty()

/**
  Fold left without init value
*/
<T> T foldl(List<T> list, (T, T)->T func) requires !list.isEmpty();

/**
  Fold right without init value
*/
<T> T foldr(List<T> list, (T, T)->T func) requires !list.isEmpty();

Topic StandardLibraryMethods . { View | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.2 - 08 Aug 2003 - 15:12 GMT - ArjanB
Revision r1.3 - 08 Aug 2003 - 15:47 GMT - ArjanB
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.