0
what is the difference between filter and takewhile functions
2 odpowiedzi
+ 4
Filter will process all elements of a collection and returns all values where the condition is True. Takewhile stops taking more elements at the first occurrence of a False condition.
+ 1
Filter will remove all items from the stream that do not satisfy the condition. takeWhile will abort the stream on the first occurrence of an item which does not satisfy the condition.
Greetings,
J Wick