Idris2/tests/idris2/interactive042/Issue35-2.idr
2022-04-29 12:52:23 +01:00

5 lines
104 B
Idris

f : { a, b : Type } -> Either a b -> Either b a
f {a=b} x = x
f (Right x) = Left x
f (Left x) = Right x