News for hackers. Stuff that matters.
Re:PullRequest pulls in $8M Series A just months after scori... by paulddraper on Saturday April 14, 2018 @09:50PM (#16840644)
Side point, but AFIAK `fold()()` is most idiomatic in Scala.
Re:PullRequest pulls in $8M Series A just months after scori... by Nullabillity on Sunday April 15, 2018 @04:47PM (#16844863)
And yet, `match` is the only one that gets correct type inference.

`.map(ifSome).getOrElse(ifNone)` infers the type from `ifSome`, and forces `ifNone` to conform.

`.fold(ifNone)(ifSome)` infers the type from `ifNone`, and forces `ifSome` to conform.

Meanwhile, `match { case Some(x) => ifSome(x); case None(x) => ifNone }` will correctly infer from both cases at once, and give you the greatest common ancestor.

Re:PullRequest pulls in $8M Series A just months after scori... by paulddraper on Tuesday April 17, 2018 @06:19PM (#16862806)
Yeah, I agree. ¯\_(ツ)_/¯