Added higher order functions & code cleanup

Added "sub_lazy", a lazy function that evaluates a string & a collection
of patterns and determines for each pattern whether it is a substring of
string or not