Arc Cross Reference

all

[procedure] some test seq

[procedure] all test seq

some sees if some elemnts in seq satisfies test. test is testified (if it's not a function, it's converted to a function [is _ test]). It is scheme:any.

(def some (test seq)
  (let f (testify test)
    (if (alist seq)
        (reclist f:car seq)
        (recstring f:seq seq))))

all sees if all elements in seq satisfies test. test is testified. It is scheme:every.

(def all (test seq) 
  (~some (complement (testify test)) seq))

See also: reclist, recstring, testify.

Categorys:sequence