fsharp / fslang-suggestions

The place to make suggestions, discuss and vote on F# language and core library features
344 stars 21 forks source link

Add filtermap to the standard library #31

Closed baronfel closed 8 years ago

baronfel commented 8 years ago

Add filtermap to the standard library [11544387]

Submitted by Dave Thomas on 1/22/2016 12:00:00 AM
23 votes on UserVoice prior to migration

Add filtermap to the standard library Rust, Elixir and other functional languages have this and it would be nice to have an alternative to the option allocating choose function: let filtermap (filter:a->bool) (map: a->b) (xs: a list) -> b list = ... Elixir:http://elixir-lang.org/docs/v1.0/elixir/Enum.html#filter_map/3 Rust: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.filter_map

Response

\ by fslang-admin on 2/4/2016 12:00:00 AM **

Declined per my comment below Don Syme, F# Language and Core Library Evolution

Original UserVoice Submission Archived Uservoice Comments

mydogisbox commented 3 years ago

Looks like the uservoice is no longer available. Is there a way to get the comments back?

kerams commented 3 years ago

This archive link works https://github.com/fsharp/fslang-suggestions/blob/d48c35ce216e2bff148937ec028ad61e5c273fdf/archive/suggestion-11544387-add-filtermap-to-the-standard-library.md

cartermp commented 3 years ago

Also I would mention that I tend to use choose whenever I have a "map something based on a condition" scenario.

mydogisbox commented 3 years ago

@kerams perfect!

@cartermp thanks! I did eventually find choose. I was thinking having the original comments here might help other people with the same question.

Is it possible to remove the original broken uservoice links (or strike them out or whatever).