count where
(
list
,
test
)
count
Type:
For any types
t
(
[
t
]
,
(
t
) ->
Boolean
)
->
Number
Counts the number of items in the list where the given test function returns true.
Examples
Click an example to insert it
count where
([
11, -2, 14, 4, 0
]
,
(
? > 10
))
→
2
count where
([
"Hi", "Hello"
]
,
(
? = "Bye"
))
→
0