Idris2/tests/idris2/interactive/interactive042/Issue35-2.idr

5 lines
104 B
Idris
Raw Normal View History

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