TU-Berlin → Inst. f. Mathematik → Algebra und Zahlentheorie → KASH → Documentation → Reference Manual
KASH3 Reference Manual
search    

Function

Number ( func pred ) -> func ctr

Description

Construct a functional `ctr(<list> l) -> elt-ord^rat' which returns the number of elements from `l' which suffice the predicate function `pred'.
Note: Apparently `pred' must have `-> elt-alg^boo' out-signature.

Examples

f:=Number(IsPrime); f([1..100]);
Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group