git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
fst and snd
0906d61Phil Freeman
prelude/prelude.purs+6
@@ -700,6 +700,12 @@ module Data.Tuple where
700
700
701 data Tuple a b = Tuple a b
701 data Tuple a b = Tuple a b
702
702
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+
703 instance showTuple :: (Show a, Show b) => Show (Tuple a b) where
709 instance showTuple :: (Show a, Show b) => Show (Tuple a b) where
704 show (Tuple a b) = "Tuple(" ++ show a ++ ", " ++ show b ++ ")"
710 show (Tuple a b) = "Tuple(" ++ show a ++ ", " ++ show b ++ ")"
705
711