|
|
|
|
|
by saagarjha
2258 days ago
|
|
If the team had just written Haskell for a year they would have picked the obviously superior "fold" name for this operation. (I think you can actually use fold here if you really wanted it, since Option implements IntoIter?): Some(0).iter().fold("some", |_, _| "none")
|
|