another related Option idiom on this thread ..https://twitter.com/runarorama/status/720376331536453633 …
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Not that anyone asked, but, I don't like that fold signature. :(
-
It's consistent with other folds though, the right parameter represents the happy path.
- Show replies
New conversation -
-
-
fold does not play nicely with type inference @ Some(1).fold(Nil)(_ :: Nil) found : List[Int] required: scala.collection.immutable.Nil.type val res0 = Some(1).fold(Nil)(_ :: Nil) ^
- End of conversation
New conversation -
-
-
Concision. That's all!
- Show replies
New conversation -
-
I like the Option cheatsheet for this http://blog.tmorris.net/posts/scalaoption-cheat-sheet/ …
-
This Tweet is unavailable.
- Show replies
New conversation -
-
-
If I have `f` and `y` as values, it's fine (especially if the type inference doesn't get in the way) - if they are more verbose, it's harder to read a fold
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.