moved fold filter and map to F#

separated fold into foldl and foldr
performance boost