|
|
|
|
|
by jmcomets
3391 days ago
|
|
I agree with you that `filter` is less explicit than something like `copy_if` (C++). Does it return elements matching the predicate or not matching it? I struggled with this for a while in CS. After learning different programming languages and getting some field experience I noticed that the `filter` pattern is pretty common in the programming world. It's one of those pervasive functional patterns that are so practical that they were included at some point in imperative languages. |
|