7mind / izumi

Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
https://izumi.7mind.io
BSD 2-Clause "Simplified" License
615 stars 66 forks source link

Implement fromOption support #488

Closed ratoshniuk closed 5 years ago

ratoshniuk commented 5 years ago

it would be nice to have methods for Option

def fromOption[T](opt: Option[T]) : F[Nothing, T]
def fromOptionWith[E](opt: Option[T])(exception: E) : F[E, T]
pshirshov commented 5 years ago

@kaishh

neko-kai commented 5 years ago

@ratoshniuk fromOption is included in current version (0.6.33) https://github.com/pshirshov/izumi-r2/blob/develop/fundamentals/fundamentals-bio/src/main/scala/com/github/pshirshov/izumi/functional/bio/BIOInvariant.scala#L57