git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
fst and snd
commit0906d61adb74d66b698b3c8c9505b5bd839aef85 authorPhil Freeman <paf31@cantab.net> dateSat 15 Mar 2014, 17:26 (13 years ago) parentc6d48a9
1 file changed+6
prelude/prelude.purs+6
prelude/prelude.purs+6
@@ -700,6 +700,12 @@ module Data.Tuple where
700700
701701 data Tuple a b = Tuple a b
702702
703+ fst :: forall a b. Tuple a b -> a
704+ fst (Tuple a _) = a
705+
706+ snd :: forall a b. Tuple a b -> b
707+ snd (Tuple _ b) = b
708+
703709 instance showTuple :: (Show a, Show b) => Show (Tuple a b) where
704710 show (Tuple a b) = "Tuple(" ++ show a ++ ", " ++ show b ++ ")"
705711