/**
* @tsplus static List.Aspects exists
* @tsplus pipeable List exists
*/
export function exists(p: Predicate) {
return (self: List): boolean => {
let these = self
while (!these.isNil()) {
if (p(these.head)) {
return true
}
these = these.tail
}
return false
}
}