@@ -163,11 +163,9 @@ length (groupBy productCategory (filter isInStock (products)))
163(:) :: forall a. a -> [a] -> [a]
163(:) :: forall a. a -> [a] -> [a]
166−Attaches an element to the front of an array, creating a new array.
166+An infix alias for `cons`.
168−```purescript
168+Note, the running time of this function is `O(n)`.
169−1 : [2, 3, 4] = [1, 2, 3, 4]
172#### `cons`
170#### `cons`
@@ -175,6 +173,13 @@ Attaches an element to the front of an array, creating a new array.
175cons :: forall a. a -> [a] -> [a]
173cons :: forall a. a -> [a] -> [a]
176+Attaches an element to the front of an array, creating a new array.
179+cons 1 [2, 3, 4] = [1, 2, 3, 4]
182+Note, the running time of this function is `O(n)`.
179#### `Show`
184#### `Show`
@@ -355,7 +360,7 @@ where the function argument of `f` is given the name `y`.
356`Bind` instances should satisfy the following law:
361`Bind` instances should satisfy the following law:
358−- Associativity: `forall f g x. (x >>= f) >>= g = x >>= (\k => f k >>= g)`
363+- Associativity: `(x >>= f) >>= g = x >>= (\k => f k >>= g)`
360Or, expressed using `do` notation:
365Or, expressed using `do` notation:
@@ -602,10 +607,10 @@ The `Eq` type class represents types which support decidable equality.
603`Eq` instances should satisfy the following laws:
608`Eq` instances should satisfy the following laws:
605−- Reflexivity: `forall x. x == x = true`
610+- Reflexivity: `x == x = true`
606−- Symmetry: `forall x y. x == y = y == x`
611+- Symmetry: `x == y = y == x`
607- Transitivity: if `x == y` and `y == z` then `x == z`
612- Transitivity: if `x == y` and `y == z` then `x == z`
608−- Negation: `forall x y. x /= y = not (x == y)`
613+- Negation: `x /= y = not (x == y)`
610`(/=)` may be implemented in terms of `(==)`, but it might give a performance improvement to implement it separately.
615`(/=)` may be implemented in terms of `(==)`, but it might give a performance improvement to implement it separately.
@@ -831,7 +836,7 @@ The `Semigroup` type class identifies an associative operation on a type.
832`Semigroup` instances are required to satisfy the following law:
837`Semigroup` instances are required to satisfy the following law:
834−- Associativity: `forall x y z. (x <> y) <> z = x <> (y <> z)`
839+- Associativity: `(x <> y) <> z = x <> (y <> z)`
836For example, the `String` type is an instance of `Semigroup`, where `(<>)` is defined to be string concatenation.
841For example, the `String` type is an instance of `Semigroup`, where `(<>)` is defined to be string concatenation.