Skip to content

Commit ff03117

Browse files
committed
Add basic documentation
1 parent fed3f6f commit ff03117

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Data.Tuple
2+
3+
### Types
4+
5+
data Tuple a b where
6+
Tuple :: a -> b -> Tuple a b
7+
8+
### Type Class Instances
9+
10+
instance applicativeTuple :: (Monoid a) => Applicative (Tuple a)
11+
12+
instance applyTuple :: (Semigroup a) => Apply (Tuple a)
13+
14+
instance bindTuple :: (Semigroup a) => Bind (Tuple a)
15+
16+
instance eqTuple :: (Eq a, Eq b) => Eq (Tuple a b)
17+
18+
instance functorTuple :: Functor (Tuple a)
19+
20+
instance monadTuple :: (Monoid a) => Monad (Tuple a)
21+
22+
instance ordTuple :: (Ord a, Ord b) => Ord (Tuple a b)
23+
24+
instance showTuple :: (Show a, Show b) => Show (Tuple a b)
25+
26+
### Values
27+
28+
curry :: forall a b c. (Tuple a b -> c) -> a -> b -> c
29+
30+
fst :: forall a b. Tuple a b -> a
31+
32+
snd :: forall a b. Tuple a b -> b
33+
34+
swap :: forall a b. Tuple a b -> Tuple b a
35+
36+
uncurry :: forall a b c. (a -> b -> c) -> Tuple a b -> c
37+
38+
unzip :: forall a b. [Tuple a b] -> Tuple [a] [b]
39+
40+
zip :: forall a b. [a] -> [b] -> [Tuple a b]

0 commit comments

Comments
 (0)