o-deps.proto-purs_2.11.2.1.3.io.github.zero-deps.proto-tex_3.2.1.3.source-code.ext.scala Maven / Gradle / Ivy
package proto.tex
extension [A](x: Option[A])
def cata[B](f: A => B, b: => B): B =
x match
case Some(a) => f(a)
case None => b