Making lazy sequences foldable