Failure in try! block
Hi. I have a question about behavior of try!.
try! { 1 } # => Success(1)
try! { Success(1) } # => Success(1)
try! { Failure(1) } # => Success(Failure(1))
Is this behavior intended? Thanks.
No. Shouldn't be like that
Piotr
On 22 Jun 2016 07:49 +0200, Hong [email protected], wrote:
Hi. I have a question about behavior oftry!.
try! {1}# =>Success(1)try! {Success(1) }# =>Success(1)try! {Failure(1) }#=>Success(Failure(1))
Is this behavior intended? Thanks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly,view it on GitHub(https://github.com/pzol/deterministic/issues/32), ormute the thread(https://github.com/notifications/unsubscribe/AAI2z9MzH8uwDpOWm3oJ2Ed1BU0tFpZoks5qOMzWgaJpZM4I7bXP).
Then, below is correct behavior?
try! { 1 } # => Success(1)
try! { Success(1) } # => Success(1)
try! { Failure(1) } # => Failure(1)
Yes
Piotr
On 22 Jun 2016 18:02 +0200, Hong [email protected], wrote:
Then, below is correct behavior?
try! {1}# =>Success(1)try! {Success(1) }# =>Success(1)try! {Failure(1) }# =>Failure(1)
— You are receiving this because you commented. Reply to this email directly,view it on GitHub(https://github.com/pzol/deterministic/issues/32#issuecomment-227791701), ormute the thread(https://github.com/notifications/unsubscribe/AAI2z8vUQ_tlWrq2ZzOOx9BBx16gjYgtks5qOVxwgaJpZM4I7bXP).