Y
Hacker News
new
|
ask
|
show
|
jobs
by
tikue_
4095 days ago
I wish `and_then` were named `flat_map` so badly.
1 comments
Manishearth
4094 days ago
We have `flat_map` for iterators. (`and_then` works for Options, which are basically nullables)
You can convert an Option to a zero-cost iterator and then use `flat_map` though.
link
You can convert an Option to a zero-cost iterator and then use `flat_map` though.