whiler now accepts fns as endvals
drain now accepts predicate fns for endval
Added another test to drain to test when passing a fn.