Commit dd7a53de authored by Mart Lubbers's avatar Mart Lubbers

Fix app* for unique arguments in the tuple

parent 160639cf
Pipeline #8962 passed with stage
in 1 minute and 53 seconds
......@@ -9,12 +9,12 @@ from Data.Bifunctor import class Bifunctor
tuple :: .a .b -> .(.a,.b)
tuple3 :: .a .b .c -> .(.a,.b,.c)
appFst :: (.a -> .c) !(.a,.b) -> (.c,.b)
appSnd :: (.b -> .c) !(.a,.b) -> (.a,.c)
appFst :: .(.a -> .c) !(.a,.b) -> (.c,.b)
appSnd :: .(.b -> .c) !(.a,.b) -> (.a,.c)
appFst3 :: (.a -> .d) !(.a,.b,.c) -> (.d,.b,.c)
appSnd3 :: (.b -> .d) !(.a,.b,.c) -> (.a,.d,.c)
appThd3 :: (.c -> .d) !(.a,.b,.c) -> (.a,.b,.d)
appFst3 :: .(.a -> .d) !(.a,.b,.c) -> (.d,.b,.c)
appSnd3 :: .(.b -> .d) !(.a,.b,.c) -> (.a,.d,.c)
appThd3 :: .(.c -> .d) !(.a,.b,.c) -> (.a,.b,.d)
swap :: !.(.a, .b) -> .(.b, .a)
......
......@@ -16,19 +16,19 @@ tuple a b = (a,b)
tuple3 :: .a .b .c -> .(.a,.b,.c)
tuple3 a b c = (a,b,c)
appFst:: (.a -> .c) !(.a,.b) -> (.c,.b)
appFst:: .(.a -> .c) !(.a,.b) -> (.c,.b)
appFst f (a,b) = (f a,b)
appSnd :: (.b -> .c) !(.a,.b) -> (.a,.c)
appSnd :: .(.b -> .c) !(.a,.b) -> (.a,.c)
appSnd f (a,b) = (a,f b)
appFst3 :: (.a -> .d) !(.a,.b,.c) -> (.d,.b,.c)
appFst3 :: .(.a -> .d) !(.a,.b,.c) -> (.d,.b,.c)
appFst3 f (a,b,c) = (f a,b,c)
appSnd3 :: (.b -> .d) !(.a,.b,.c) -> (.a,.d,.c)
appSnd3 :: .(.b -> .d) !(.a,.b,.c) -> (.a,.d,.c)
appSnd3 f (a,b,c) = (a,f b,c)
appThd3 :: (.c -> .d) !(.a,.b,.c) -> (.a,.b,.d)
appThd3 :: .(.c -> .d) !(.a,.b,.c) -> (.a,.b,.d)
appThd3 f (a,b,c) = (a,b,f c)
swap :: !.(.a, .b) -> .(.b, .a)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment