Implement take/takeWhile/forAll/exists/hasSubSequence.