sahil Lone
12/12/2019, 12:21 PMraulraja
12/12/2019, 12:34 PMval worldFaithIO = IO { throw RuntimeException("BOOM!") }
//world is still ok
val worldFaithTry = Try { throw RuntimeException("BOOM!") }
//world blew up
raulraja
12/12/2019, 12:36 PMTry
the closes is to use try / catch
as an expression which already does what you want. try/catch is the same as folding over Try.Success or Try.Failure if you use it as an expression. IMO Try it’s pointless datatype that got in because of the earlier Scala influencesahil Lone
12/12/2019, 12:46 PMsahil Lone
12/12/2019, 1:33 PMJannis
12/12/2019, 1:52 PM