diff --git a/README.md b/README.md
index dc7fb6c6..3ffc85de 100644
--- a/README.md
+++ b/README.md
@@ -134,7 +134,7 @@ const S = process.env.NODE_ENV === 'production' ?
### Classify
-
+
Takes a value, `x`, of any type and returns its type identifier. If
`x` has a `'@@type'` property whose value is a string, `x['@@type']`
@@ -153,7 +153,7 @@ is defined.
'Array'
```
-
+
Takes a [type representative](#type-representatives) and a value of
any type and returns `true` if the given value is of the specified
@@ -172,7 +172,7 @@ false
### Combinator
-
+
The I combinator. Returns its argument. Equivalent to Haskell's `id`
function.
@@ -182,7 +182,7 @@ function.
'foo'
```
-
+
The K combinator. Takes two values and returns the first. Equivalent to
Haskell's `const` function.
@@ -195,7 +195,7 @@ Haskell's `const` function.
[42, 42, 42, 42, 42]
```
-
+
The A combinator. Takes a function and a value, and returns the result of
applying the function to the value. Equivalent to Haskell's `($)` function.
@@ -208,7 +208,7 @@ applying the function to the value. Equivalent to Haskell's `($)` function.
[101, 10]
```
-
+
The C combinator. Takes a curried binary function and two values, and
returns the result of applying the function to the values in reverse.
@@ -226,7 +226,7 @@ functions.
[3, 4, 2]
```
-
+
The B combinator. Takes two functions and a value, and returns the result
of applying the first function to the result of applying the second to the
@@ -237,7 +237,7 @@ value. Equivalent to [`compose`](#compose) and Haskell's `(.)` function.
10
```
-
+
The S combinator. Takes a curried binary function, a unary function,
and a value, and returns the result of applying the binary function to:
@@ -252,7 +252,7 @@ and a value, and returns the result of applying the binary function to:
### Function
-
+
Takes a binary function and two values and returns the result of
applying the function - with its argument order reversed - to the
@@ -266,7 +266,7 @@ See also [`C`](#C).
[1, 4, 9, 16, 25]
```
-
+
Promotes a unary function to a function which operates on a [Functor][].
@@ -278,7 +278,7 @@ Just(3)
Nothing()
```
-
+
Promotes a binary function to a function which operates on two
[Apply][]s.
@@ -297,7 +297,7 @@ Just(true)
Just(false)
```
-
+
Promotes a ternary function to a function which operates on three
[Apply][]s.
@@ -312,7 +312,7 @@ Nothing()
### Composition
-
+
Takes two functions assumed to be unary and a value of any type,
and returns the result of applying the first function to the result
@@ -328,7 +328,7 @@ See also [`B`](#B) and [`pipe`](#pipe).
10
```
-
+
Takes a list of functions assumed to be unary and a value of any type,
and returns the result of applying the sequence of transformations to
@@ -344,7 +344,7 @@ See also [`meld`](#meld).
9
```
-
+
Takes a list of non-nullary functions and returns a curried function
whose arity is one greater than the sum of the arities of the given
@@ -379,15 +379,15 @@ either a Just whose value is of type `a` or a Nothing (with no value).
The Maybe type satisfies the [Monoid][], [Monad][], [Traversable][],
and [Extend][] specifications.
-
+
A [`UnaryType`][UnaryType] for use with [sanctuary-def][].
-
+
The [type representative](#type-representatives) for the Maybe type.
-
+
Returns a Nothing.
@@ -396,7 +396,7 @@ Returns a Nothing.
Nothing()
```
-
+
Takes a value of any type and returns a Just with the given value.
@@ -405,11 +405,11 @@ Takes a value of any type and returns a Just with the given value.
Just(42)
```
-
+
Maybe type identifier, `'sanctuary/Maybe'`.
-
+
`true` if `this` is a Nothing; `false` if `this` is a Just.
@@ -421,7 +421,7 @@ true
false
```
-
+
`true` if `this` is a Just; `false` if `this` is a Nothing.
@@ -433,7 +433,7 @@ true
false
```
-
+
Takes a value of type `Maybe a` and returns a Nothing unless `this`
is a Just *and* the argument is a Just, in which case it returns a
@@ -451,7 +451,7 @@ Nothing()
Just(43)
```
-
+
Takes a function and returns `this` if `this` is a Nothing; otherwise
it returns the result of applying the function to this Just's value.
@@ -467,7 +467,7 @@ Nothing()
Just(12.34)
```
-
+
Returns the result of concatenating two Maybe values of the same type.
`a` must have a [Semigroup][] (indicated by the presence of a `concat`
@@ -496,7 +496,7 @@ Just([1, 2, 3])
Just([1, 2, 3])
```
-
+
Returns a Nothing.
@@ -505,7 +505,7 @@ Returns a Nothing.
Nothing()
```
-
+
Takes a value of any type and returns `true` if:
@@ -531,7 +531,7 @@ false
false
```
-
+
Takes a function and returns `this` if `this` is a Nothing; otherwise
it returns a Just whose value is the result of applying the function to
@@ -545,7 +545,7 @@ Nothing()
Just(43)
```
-
+
Takes a predicate and returns `this` if `this` is a Just whose value
satisfies the predicate; Nothing otherwise.
@@ -558,7 +558,7 @@ Just(42)
Nothing()
```
-
+
Takes a function and returns `this` if `this` is a Nothing; otherwise
it returns a Just whose value is the result of applying the function to
@@ -572,7 +572,7 @@ Nothing()
Just(6)
```
-
+
Takes a value of any type and returns a Just with the given value.
@@ -581,7 +581,7 @@ Takes a value of any type and returns a Just with the given value.
Just(42)
```
-
+
Takes a function and an initial value of any type, and returns:
@@ -598,7 +598,7 @@ Takes a function and an initial value of any type, and returns:
15
```
-
+
Evaluates an applicative action contained within the Maybe, resulting in:
@@ -610,11 +610,11 @@ Evaluates an applicative action contained within the Maybe, resulting in:
> S.Nothing().sequence(S.Either.of)
Right(Nothing())
-> S.Just(Right(42)).sequence(S.Either.of)
+> S.Just(S.Right(42)).sequence(S.Either.of)
Right(Just(42))
```
-
+
Returns `false` if `this` is a Nothing; `true` if `this` is a Just.
@@ -626,7 +626,7 @@ false
true
```
-
+
Returns the string representation of the Maybe.
@@ -638,7 +638,7 @@ Returns the string representation of the Maybe.
'Just([1, 2, 3])'
```
-
+
Returns the string representation of the Maybe. This method is used by
`util.inspect` and the REPL to format a Maybe for display.
@@ -653,7 +653,7 @@ See also [`Maybe#toString`](#Maybe.prototype.toString).
'Just([1, 2, 3])'
```
-
+
Returns a Nothing. Though this is a constructor function the `new`
keyword needn't be used.
@@ -663,7 +663,7 @@ keyword needn't be used.
Nothing()
```
-
+
Takes a value of any type and returns a Just with the given value.
Though this is a constructor function the `new` keyword needn't be
@@ -674,7 +674,7 @@ used.
Just(42)
```
-
+
Returns `true` if the given Maybe is a Nothing; `false` if it is a Just.
@@ -686,7 +686,7 @@ true
false
```
-
+
Returns `true` if the given Maybe is a Just; `false` if it is a Nothing.
@@ -698,7 +698,7 @@ true
false
```
-
+
Takes a default value and a Maybe, and returns the Maybe's value
if the Maybe is a Just; the default value otherwise.
@@ -711,7 +711,7 @@ if the Maybe is a Just; the default value otherwise.
0
```
-
+
Takes a value and returns Nothing if the value is null or undefined;
Just the value otherwise.
@@ -724,7 +724,7 @@ Nothing()
Just(42)
```
-
+
Takes a value of any type, a function, and a Maybe. If the Maybe is
a Just, the return value is the result of applying the function to
@@ -738,7 +738,7 @@ the Just's value. Otherwise, the first argument is returned.
0
```
-
+
Takes a list of Maybes and returns a list containing each Just's value.
@@ -747,7 +747,7 @@ Takes a list of Maybes and returns a list containing each Just's value.
['foo', 'baz']
```
-
+
Takes a function and a list, applies the function to each element of
the list, and returns a list of "successful" results. If the result of
@@ -762,7 +762,7 @@ In general terms, `mapMaybe` filters a list while mapping over it.
[1, 4]
```
-
+
Takes a unary function `f` which may throw and a value `x` of any type,
and applies `f` to `x` inside a `try` block. If an exception is caught,
@@ -779,11 +779,11 @@ Just(2)
Nothing()
```
-
+
Binary version of [`encase`](#encase).
-
+
Ternary version of [`encase`](#encase).
@@ -796,15 +796,15 @@ value is of type `b`.
The Either type satisfies the [Semigroup][], [Monad][], and [Extend][]
specifications.
-
+
A [`BinaryType`][BinaryType] for use with [sanctuary-def][].
-
+
The [type representative](#type-representatives) for the Either type.
-
+
Takes a value of any type and returns a Right with the given value.
@@ -813,11 +813,11 @@ Takes a value of any type and returns a Right with the given value.
Right(42)
```
-
+
Either type identifier, `'sanctuary/Either'`.
-
+
`true` if `this` is a Left; `false` if `this` is a Right.
@@ -829,7 +829,7 @@ true
false
```
-
+
`true` if `this` is a Right; `false` if `this` is a Left.
@@ -841,7 +841,7 @@ true
false
```
-
+
Takes a value of type `Either a b` and returns a Left unless `this`
is a Right *and* the argument is a Right, in which case it returns
@@ -859,7 +859,7 @@ Left('Cannot divide by zero')
Right(43)
```
-
+
Takes a function and returns `this` if `this` is a Left; otherwise
it returns the result of applying the function to this Right's value.
@@ -880,7 +880,7 @@ Left('Cannot represent square root of negative number')
Right(5)
```
-
+
Returns the result of concatenating two Either values of the same type.
`a` must have a [Semigroup][] (indicated by the presence of a `concat`
@@ -910,7 +910,7 @@ Right([1, 2, 3])
Right([1, 2, 3])
```
-
+
Takes a value of any type and returns `true` if:
@@ -931,7 +931,7 @@ false
false
```
-
+
Takes a function and returns `this` if `this` is a Left; otherwise it
returns a Right whose value is the result of applying the function to
@@ -945,7 +945,7 @@ Left('Cannot divide by zero')
Right(43)
```
-
+
Takes a function and returns `this` if `this` is a Left; otherwise it
returns a Right whose value is the result of applying the function to
@@ -959,7 +959,7 @@ Left('Cannot divide by zero')
Right(6)
```
-
+
Takes a value of any type and returns a Right with the given value.
@@ -968,7 +968,7 @@ Takes a value of any type and returns a Right with the given value.
Right(42)
```
-
+
Returns `false` if `this` is a Left; `true` if `this` is a Right.
@@ -980,7 +980,7 @@ false
true
```
-
+
Returns the string representation of the Either.
@@ -992,7 +992,7 @@ Returns the string representation of the Either.
'Right([1, 2, 3])'
```
-
+
Returns the string representation of the Either. This method is used by
`util.inspect` and the REPL to format a Either for display.
@@ -1007,7 +1007,7 @@ See also [`Either#toString`](#Either.prototype.toString).
'Right([1, 2, 3])'
```
-
+
Takes a value of any type and returns a Left with the given value.
Though this is a constructor function the `new` keyword needn't be
@@ -1018,7 +1018,7 @@ used.
Left('Cannot divide by zero')
```
-
+
Takes a value of any type and returns a Right with the given value.
Though this is a constructor function the `new` keyword needn't be
@@ -1029,7 +1029,7 @@ used.
Right(42)
```
-
+
Returns `true` if the given Either is a Left; `false` if it is a Right.
@@ -1041,7 +1041,7 @@ true
false
```
-
+
Returns `true` if the given Either is a Right; `false` if it is a Left.
@@ -1053,7 +1053,7 @@ true
false
```
-
+
Takes two functions and an Either, and returns the result of
applying the first function to the Left's value, if the Either
@@ -1068,7 +1068,7 @@ Right's value, if the Either is a Right.
'42'
```
-
+
Takes a list of Eithers and returns a list containing each Left's value.
@@ -1079,7 +1079,7 @@ See also [`rights`](#rights).
['foo', 'bar']
```
-
+
Takes a list of Eithers and returns a list containing each Right's value.
@@ -1090,7 +1090,7 @@ See also [`lefts`](#lefts).
[20, 10]
```
-
+
Takes two unary functions, `f` and `g`, the second of which may throw,
and a value `x` of any type. Applies `g` to `x` inside a `try` block.
@@ -1111,15 +1111,15 @@ Left(new SyntaxError('Unexpected end of input'))
Left('Unexpected end of input')
```
-
+
Binary version of [`encaseEither`](#encaseEither).
-
+
Ternary version of [`encaseEither`](#encaseEither).
-
+
Takes a value of any type and a Maybe, and returns an Either.
If the second argument is a Nothing, a Left containing the first
@@ -1136,7 +1136,7 @@ Right(42)
### Alternative
-
+
Takes two values of the same type and returns the second value
if the first is "true"; the first value otherwise. An array is
@@ -1152,7 +1152,7 @@ Just(2)
Nothing()
```
-
+
Takes two values of the same type and returns the first value if it
is "true"; the second value otherwise. An array is considered "true"
@@ -1167,7 +1167,7 @@ Just(1)
Just(3)
```
-
+
Takes two values of the same type and returns the "true" value
if one value is "true" and the other is "false"; otherwise it
@@ -1186,7 +1186,7 @@ Nothing()
### Logic
-
+
Takes a Boolean and returns the negation of that value
(`false` for `true`; `true` for `false`).
@@ -1199,7 +1199,7 @@ false
true
```
-
+
Takes a unary predicate, a unary "if" function, a unary "else"
function, and a value of any type, and returns the result of
@@ -1215,7 +1215,7 @@ value otherwise.
4
```
-
+
Takes an array of unary predicates and a value of any type
and returns `true` if all the predicates pass; `false` otherwise.
@@ -1230,7 +1230,7 @@ true
false
```
-
+
Takes an array of unary predicates and a value of any type
and returns `true` if any of the predicates pass; `false` otherwise.
@@ -1247,7 +1247,7 @@ false
### List
-
+
Returns Just a list containing the elements from the supplied list
from a beginning index (inclusive) to an end index (exclusive).
@@ -1276,7 +1276,7 @@ Nothing()
Just('nana')
```
-
+
Takes an index and a list and returns Just the element of the list at
the index if the index is within the list's bounds; Nothing otherwise.
@@ -1293,7 +1293,7 @@ Nothing()
Just('d')
```
-
+
Takes a list and returns Just the first element of the list if the
list contains at least one element; Nothing if the list is empty.
@@ -1306,7 +1306,7 @@ Just(1)
Nothing()
```
-
+
Takes a list and returns Just the last element of the list if the
list contains at least one element; Nothing if the list is empty.
@@ -1319,7 +1319,7 @@ Just(3)
Nothing()
```
-
+
Takes a list and returns Just a list containing all but the first
of the list's elements if the list contains at least one element;
@@ -1333,7 +1333,7 @@ Just([2, 3])
Nothing()
```
-
+
Takes a list and returns Just a list containing all but the last
of the list's elements if the list contains at least one element;
@@ -1347,7 +1347,7 @@ Just([1, 2])
Nothing()
```
-
+
Returns Just the first N elements of the given collection if N is
greater than or equal to zero and less than or equal to the length
@@ -1365,7 +1365,7 @@ Just('abcd')
Nothing()
```
-
+
Returns Just the last N elements of the given collection if N is
greater than or equal to zero and less than or equal to the length
@@ -1383,7 +1383,7 @@ Just('defg')
Nothing()
```
-
+
Returns Just all but the first N elements of the given collection
if N is greater than or equal to zero and less than or equal to the
@@ -1401,7 +1401,7 @@ Just('efg')
Nothing()
```
-
+
Returns Just all but the last N elements of the given collection
if N is greater than or equal to zero and less than or equal to the
@@ -1419,7 +1419,7 @@ Just('abc')
Nothing()
```
-
+
Takes a predicate and a list and returns Just the leftmost element of
the list which satisfies the predicate; Nothing if none of the list's
@@ -1433,7 +1433,7 @@ Just(-2)
Nothing()
```
-
+
Takes a value of any type and a list, and returns Just the index
of the first occurrence of the value in the list, if applicable;
@@ -1457,7 +1457,7 @@ Just(1)
Nothing()
```
-
+
Takes a value of any type and a list, and returns Just the index
of the last occurrence of the value in the list, if applicable;
@@ -1481,7 +1481,7 @@ Just(3)
Nothing()
```
-
+
Takes a [type representative](#type-representatives), a property name,
and a list of objects and returns a list of equal length. Each element
@@ -1496,7 +1496,7 @@ See also [`get`](#get).
[Just(1), Just(2), Nothing(), Nothing(), Nothing()]
```
-
+
Takes a binary function, an initial value, and a [Foldable][], and
applies the function to the initial value and the Foldable's first
@@ -1514,7 +1514,7 @@ otherwise.
[5, 4, 3, 2, 1]
```
-
+
Takes a function and a seed value, and returns a list generated by
applying the function repeatedly. The list is initially empty. The
@@ -1533,7 +1533,7 @@ of the function should result in either:
### Object
-
+
Takes a [type representative](#type-representatives), a property
name, and an object and returns Just the value of the specified object
@@ -1556,7 +1556,7 @@ Nothing()
Nothing()
```
-
+
Takes a [type representative](#type-representatives), a list of property
names, and an object and returns Just the value at the path specified by
@@ -1578,7 +1578,7 @@ Nothing()
### Number
-
+
Negates its argument.
@@ -1590,7 +1590,7 @@ Negates its argument.
42
```
-
+
Returns the sum of two (finite) numbers.
@@ -1599,7 +1599,7 @@ Returns the sum of two (finite) numbers.
2
```
-
+
Returns the difference between two (finite) numbers.
@@ -1608,7 +1608,7 @@ Returns the difference between two (finite) numbers.
2
```
-
+
Increments a (finite) number by one.
@@ -1617,7 +1617,7 @@ Increments a (finite) number by one.
2
```
-
+
Decrements a (finite) number by one.
@@ -1626,7 +1626,7 @@ Decrements a (finite) number by one.
1
```
-
+
Returns the product of two (finite) numbers.
@@ -1635,7 +1635,7 @@ Returns the product of two (finite) numbers.
8
```
-
+
Returns the result of dividing its first argument (a finite number) by
its second argument (a non-zero finite number).
@@ -1645,7 +1645,7 @@ its second argument (a non-zero finite number).
3.5
```
-
+
Returns the smaller of its two arguments.
@@ -1666,7 +1666,7 @@ new Date('1999-12-31')
'10'
```
-
+
Returns the larger of its two arguments.
@@ -1689,7 +1689,7 @@ new Date('2000-01-01')
### Integer
-
+
Returns `true` if the given integer is even; `false` if it is odd.
@@ -1701,7 +1701,7 @@ true
false
```
-
+
Returns `true` if the given integer is odd; `false` if it is even.
@@ -1715,7 +1715,7 @@ false
### Parse
-
+
Takes a string and returns Just the date represented by the string
if it does in fact represent a date; Nothing otherwise.
@@ -1728,7 +1728,7 @@ Just(new Date('2011-01-19T17:40:00.000Z'))
Nothing()
```
-
+
Takes a string and returns Just the number represented by the string
if it does in fact represent a number; Nothing otherwise.
@@ -1741,7 +1741,7 @@ Just(-123.45)
Nothing()
```
-
+
Takes a radix (an integer between 2 and 36 inclusive) and a string,
and returns Just the number represented by the string if it does in
@@ -1763,7 +1763,7 @@ Just(255)
Nothing()
```
-
+
Takes a string which may or may not be valid JSON, and returns Just
the result of applying `JSON.parse` to the string if valid; Nothing
@@ -1779,7 +1779,7 @@ Nothing()
### RegExp
-
+
Takes a [RegexFlags][] and a pattern, and returns a RegExp.
@@ -1788,7 +1788,7 @@ Takes a [RegexFlags][] and a pattern, and returns a RegExp.
/:\d+:/g
```
-
+
Takes a string which may contain regular expression metacharacters,
and returns a string with those metacharacters escaped.
@@ -1802,7 +1802,7 @@ Properties:
'\\-=\\*\\{XYZ\\}\\*=\\-'
```
-
+
Takes a pattern and a string, and returns `true` if the pattern
matches the string; `false` otherwise.
@@ -1815,7 +1815,7 @@ true
false
```
-
+
Takes a pattern and a string, and returns Just a list of matches
if the pattern matches the string; Nothing otherwise. Each match
@@ -1832,7 +1832,7 @@ Just([Just('bye'), Nothing()])
### String
-
+
Returns the upper-case equivalent of its argument.
@@ -1843,7 +1843,7 @@ See also [`toLower`](#toLower).
'ABC DEF 123'
```
-
+
Returns the lower-case equivalent of its argument.
@@ -1854,7 +1854,7 @@ See also [`toUpper`](#toUpper).
'abc def 123'
```
-
+
Takes a string and returns the list of words the string contains
(words are delimited by whitespace characters).
@@ -1866,7 +1866,7 @@ See also [`unwords`](#unwords).
['foo', 'bar', 'baz']
```
-
+
Takes a list of words and returns the result of joining the words
with separating spaces.
@@ -1878,7 +1878,7 @@ See also [`words`](#words).
'foo bar baz'
```
-
+
Takes a string and returns the list of lines the string contains
(lines are delimited by newlines: `'\n'` or `'\r\n'` or `'\r'`).
@@ -1891,7 +1891,7 @@ See also [`unlines`](#unlines).
['foo', 'bar', 'baz']
```
-
+
Takes a list of lines and returns the result of joining the lines
after appending a terminating line feed (`'\n'`) to each.
diff --git a/bower.json b/bower.json
index d631fdc1..11339cf8 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "sanctuary",
- "version": "0.9.0",
+ "version": "0.9.1",
"description": "Refuge from unsafe JavaScript",
"license": "MIT",
"repository": {
diff --git a/package.json b/package.json
index 799e1950..ce6bd553 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sanctuary",
- "version": "0.9.0",
+ "version": "0.9.1",
"description": "Refuge from unsafe JavaScript",
"license": "MIT",
"repository": {