Nice.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@guizmaii smarter than your original implicit to go from Boolean to Option ;) -
I tend to use `Some(x).filter(_ => myBoolean)` in that case (which is not very common, I avoid booleans like plague)
- Show replies
New conversation -
-
-
Add an inverted one named "alas"?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Think this extension is in scalaz .. (me.thinks option me)
-
It's one of those things that's always seemed to have plenty of uses, but where composing existing features has always seemed more or less adequate... until I came up with a cool name to tip the balance! ;)
- Show replies
New conversation -
-
-
And they said C++ was obtuse.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wasn't something like that added to Scala lib by
@japgolly ? -
Not sure, but it wasn't called `ergo`! ;)
End of conversation
New conversation -
-
-
I have a little `def when[A](c: Boolean)(f: => A) = if (c) Some(f) else None` ... when(me.thinks)(me)
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.