Skip to content

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Feb 21, 2019
1 parent e6a1c2a commit ae1ee51
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Sanctuary
Copyright (c) 2019 Sanctuary

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ contains exactly two values: one of type `a`; one of type `b`.
. 'Contravariant ❌ ' ]
```

#### <a name="Pair" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L120">`Pair :: a -⁠> b -⁠> Pair a b`</a>
#### <a name="Pair" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L120">`Pair :: a -⁠> b -⁠> Pair a b`</a>

Pair's sole data constructor. Additionally, it serves as the
Pair [type representative][].
Expand All @@ -51,7 +51,7 @@ Pair [type representative][].
Pair (1) (2)
```

#### <a name="Pair.fst" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L151">`Pair.fst :: Pair a b -⁠> a`</a>
#### <a name="Pair.fst" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L151">`Pair.fst :: Pair a b -⁠> a`</a>

`fst (Pair (x) (y))` is equivalent to `x`.

Expand All @@ -60,7 +60,7 @@ Pair (1) (2)
'abc'
```

#### <a name="Pair.snd" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L161">`Pair.snd :: Pair a b -⁠> b`</a>
#### <a name="Pair.snd" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L161">`Pair.snd :: Pair a b -⁠> b`</a>

`snd (Pair (x) (y))` is equivalent to `y`.

Expand All @@ -69,7 +69,7 @@ Pair (1) (2)
[1, 2, 3]
```

#### <a name="Pair.swap" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L171">`Pair.swap :: Pair a b -⁠> Pair b a`</a>
#### <a name="Pair.swap" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L171">`Pair.swap :: Pair a b -⁠> Pair b a`</a>

`swap (Pair (x) (y))` is equivalent to `Pair (y) (x)`.

Expand All @@ -78,7 +78,7 @@ Pair (1) (2)
Pair ([1, 2, 3]) ('abc')
```

#### <a name="Pair.@@type" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L181">`Pair.@@type :: String`</a>
#### <a name="Pair.@@type" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L181">`Pair.@@type :: String`</a>

Pair [type identifier][].

Expand All @@ -90,7 +90,7 @@ Pair [type identifier][].
{namespace: 'sanctuary-pair', name: 'Pair', version: 1}
```

#### <a name="Pair.prototype.@@show" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L194">`Pair#@@show :: (Showable a, Showable b) => Pair a b ~> () -⁠> String`</a>
#### <a name="Pair.prototype.@@show" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L194">`Pair#@@show :: (Showable a, Showable b) => Pair a b ~> () -⁠> String`</a>

`show (Pair (x) (y))` is equivalent to
`'Pair (' + show (x) + ') (' + show (y) + ')'`.
Expand All @@ -100,7 +100,7 @@ Pair [type identifier][].
'Pair ("abc") ([1, 2, 3])'
```

#### <a name="Pair.prototype.fantasy-land/equals" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L207">`Pair#fantasy-land/equals :: (Setoid a, Setoid b) => Pair a b ~> Pair a b -⁠> Boolean`</a>
#### <a name="Pair.prototype.fantasy-land/equals" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L207">`Pair#fantasy-land/equals :: (Setoid a, Setoid b) => Pair a b ~> Pair a b -⁠> Boolean`</a>

`Pair (x) (y)` is equal to `Pair (v) (w)` [iff][] `x` is equal to `v`
and `y` is equal to `w` according to [`Z.equals`][].
Expand All @@ -113,7 +113,7 @@ true
false
```

#### <a name="Pair.prototype.fantasy-land/lte" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L223">`Pair#fantasy-land/lte :: (Ord a, Ord b) => Pair a b ~> Pair a b -⁠> Boolean`</a>
#### <a name="Pair.prototype.fantasy-land/lte" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L223">`Pair#fantasy-land/lte :: (Ord a, Ord b) => Pair a b ~> Pair a b -⁠> Boolean`</a>

`Pair (x) (y)` is less than or equal to `Pair (v) (w)` [iff][] `x` is
less than `v` or `x` is equal to `v` and `y` is less than or equal to
Expand All @@ -131,7 +131,7 @@ less than `v` or `x` is equal to `v` and `y` is less than or equal to
. Pair ('b') (2) ]
```

#### <a name="Pair.prototype.fantasy-land/compose" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L245">`Pair#fantasy-land/compose :: Pair a b ~> Pair b c -⁠> Pair a c`</a>
#### <a name="Pair.prototype.fantasy-land/compose" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L245">`Pair#fantasy-land/compose :: Pair a b ~> Pair b c -⁠> Pair a c`</a>

`compose (Pair (x) (y)) (Pair (v) (w))` is equivalent to `Pair (v) (y)`.

Expand All @@ -140,7 +140,7 @@ less than `v` or `x` is equal to `v` and `y` is less than or equal to
Pair ([1, 2, 3]) (0)
```

#### <a name="Pair.prototype.fantasy-land/concat" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L257">`Pair#fantasy-land/concat :: (Semigroup a, Semigroup b) => Pair a b ~> Pair a b -⁠> Pair a b`</a>
#### <a name="Pair.prototype.fantasy-land/concat" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L257">`Pair#fantasy-land/concat :: (Semigroup a, Semigroup b) => Pair a b ~> Pair a b -⁠> Pair a b`</a>

`concat (Pair (x) (y)) (Pair (v) (w))` is equivalent to
`Pair (concat (x) (v)) (concat (y) (w))`.
Expand All @@ -150,7 +150,7 @@ Pair ([1, 2, 3]) (0)
Pair ('abcxyz') ([1, 2, 3, 4, 5, 6])
```

#### <a name="Pair.prototype.fantasy-land/map" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L271">`Pair#fantasy-land/map :: Pair a b ~> (b -⁠> c) -⁠> Pair a c`</a>
#### <a name="Pair.prototype.fantasy-land/map" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L271">`Pair#fantasy-land/map :: Pair a b ~> (b -⁠> c) -⁠> Pair a c`</a>

`map (f) (Pair (x) (y))` is equivalent to `Pair (x) (f (y))`.

Expand All @@ -159,7 +159,7 @@ Pair ('abcxyz') ([1, 2, 3, 4, 5, 6])
Pair ('abc') (16)
```

#### <a name="Pair.prototype.fantasy-land/bimap" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L283">`Pair#fantasy-land/bimap :: Pair a c ~> (a -⁠> b, c -⁠> d) -⁠> Pair b d`</a>
#### <a name="Pair.prototype.fantasy-land/bimap" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L283">`Pair#fantasy-land/bimap :: Pair a c ~> (a -⁠> b, c -⁠> d) -⁠> Pair b d`</a>

`bimap (f) (g) (Pair (x) (y))` is equivalent to `Pair (f (x)) (g (y))`.

Expand All @@ -168,7 +168,7 @@ Pair ('abc') (16)
Pair ('ABC') (16)
```

#### <a name="Pair.prototype.fantasy-land/ap" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L295">`Pair#fantasy-land/ap :: Semigroup a => Pair a b ~> Pair a (b -⁠> c) -⁠> Pair a c`</a>
#### <a name="Pair.prototype.fantasy-land/ap" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L295">`Pair#fantasy-land/ap :: Semigroup a => Pair a b ~> Pair a (b -⁠> c) -⁠> Pair a c`</a>

`ap (Pair (v) (f)) (Pair (x) (y))` is equivalent to
`Pair (concat (v) (x)) (f (y))`.
Expand All @@ -178,7 +178,7 @@ Pair ('ABC') (16)
Pair ('abcxyz') (16)
```

#### <a name="Pair.prototype.fantasy-land/chain" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L308">`Pair#fantasy-land/chain :: Semigroup a => Pair a b ~> (b -⁠> Pair a c) -⁠> Pair a c`</a>
#### <a name="Pair.prototype.fantasy-land/chain" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L308">`Pair#fantasy-land/chain :: Semigroup a => Pair a b ~> (b -⁠> Pair a c) -⁠> Pair a c`</a>

`chain (f) (Pair (x) (y))` is equivalent to
`Pair (concat (x) (fst (f (y)))) (snd (f (y)))`.
Expand All @@ -188,7 +188,7 @@ Pair ('abcxyz') (16)
Pair ('abc256') (16)
```

#### <a name="Pair.prototype.fantasy-land/reduce" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L322">`Pair#fantasy-land/reduce :: Pair a b ~> ((c, b) -⁠> c, c) -⁠> c`</a>
#### <a name="Pair.prototype.fantasy-land/reduce" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L322">`Pair#fantasy-land/reduce :: Pair a b ~> ((c, b) -⁠> c, c) -⁠> c`</a>

`reduce (f) (x) (Pair (v) (w))` is equivalent to `f (x) (w)`.

Expand All @@ -197,7 +197,7 @@ Pair ('abc256') (16)
[1, 2, 3, 4, 5, 6]
```

#### <a name="Pair.prototype.fantasy-land/traverse" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L334">`Pair#fantasy-land/traverse :: Applicative f => Pair a b ~> (TypeRep f, b -⁠> f c) -⁠> f (Pair a c)`</a>
#### <a name="Pair.prototype.fantasy-land/traverse" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L334">`Pair#fantasy-land/traverse :: Applicative f => Pair a b ~> (TypeRep f, b -⁠> f c) -⁠> f (Pair a c)`</a>

`traverse (_) (f) (Pair (x) (y))` is equivalent to
`map (Pair (x)) (f (y))`.
Expand All @@ -207,7 +207,7 @@ Pair ('abc256') (16)
[Pair (123) ('foo'), Pair (123) ('bar'), Pair (123) ('baz')]
```

#### <a name="Pair.prototype.fantasy-land/extend" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L347">`Pair#fantasy-land/extend :: Pair a b ~> (Pair a b -⁠> c) -⁠> Pair a c`</a>
#### <a name="Pair.prototype.fantasy-land/extend" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L347">`Pair#fantasy-land/extend :: Pair a b ~> (Pair a b -⁠> c) -⁠> Pair a c`</a>

`extend (f) (Pair (x) (y))` is equivalent to
`Pair (x) (f (Pair (x) (y)))`.
Expand All @@ -217,7 +217,7 @@ Pair ('abc256') (16)
Pair ('abc') (100)
```

#### <a name="Pair.prototype.fantasy-land/extract" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.0.0/index.js#L360">`Pair#fantasy-land/extract :: Pair a b ~> () -⁠> b`</a>
#### <a name="Pair.prototype.fantasy-land/extract" href="https://github.com/sanctuary-js/sanctuary-pair/blob/v1.1.0/index.js#L360">`Pair#fantasy-land/extract :: Pair a b ~> () -⁠> b`</a>

`extract (Pair (x) (y))` is equivalent to `y`.

Expand All @@ -227,8 +227,8 @@ Pair ('abc') (100)
```

[Fantasy Land]: https://github.com/fantasyland/fantasy-land/tree/v3.5.0
[`Z.equals`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v9.0.0#equals
[`Z.lte`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v9.0.0#lte
[`Z.equals`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v10.0.0#equals
[`Z.lte`]: https://github.com/sanctuary-js/sanctuary-type-classes/tree/v10.0.0#lte
[iff]: https://en.wikipedia.org/wiki/If_and_only_if
[type identifier]: https://github.com/sanctuary-js/sanctuary-type-identifiers/tree/v2.0.1
[type representative]: https://github.com/fantasyland/fantasy-land/tree/v3.5.0#type-representatives
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sanctuary-pair",
"version": "1.0.0",
"version": "1.1.0",
"description": "Fantasy Land -compliant Pair type",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit ae1ee51

Please sign in to comment.