mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-05 18:21:40 +03:00
One more test.
This commit is contained in:
parent
7b65d888f3
commit
8f08f794b0
@ -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"
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user