One more test.

This commit is contained in:
Erik Svedäng 2020-04-29 14:01:41 +02:00
parent 7b65d888f3
commit 8f08f794b0

View File

@ -129,5 +129,14 @@
&(Maybe.Nothing)
&(to-maybe (the (Result Int String) (Error @"error")))
"to-maybe works with Error"
)
(assert-equal test
123
(match (the (Result (Result Int String) String) (Success (Success 123)))
(Success (Error _)) 0
(Error _) 0
(Success (Success x)) x)
"matching on nested results"
)
)