git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
generally edited and revised
commit6b4c631bc3464ee056ea2bdea81abec9ecc51ed3 authorJP Smith <jp.smith@ilstu.edu> dateMon 23 Feb 2015, 15:43 (12 years ago) parent88f031e
1 file changed+20−26
prelude/prelude.purs+20−26
prelude/prelude.purs+20−26
@@ -61,10 +61,10 @@ module Prelude
6161 infixr 9 >>>
6262 infixr 9 <<<
6363
64− -- | Semigroupoids are Categories, less `id`, which is to say they consist of objects and
65− -- | morphisms between them which can be composed.
64+ -- | A `Semigroupoid` is similar to a [`Category`](#Category) but does not require an identity
65+ -- | element `id`, just composable morphisms.
6666 -- |
67− -- | Semigroupoids should obey the following rule:
67+ -- | `Semigroupoid`s should obey the following rule:
6868 -- |
6969 -- | Association
7070 -- | forall p q r. p <<< (q <<< r) = (p <<< q) <<< r
@@ -78,13 +78,10 @@ module Prelude
7878 (>>>) :: forall a b c d. (Semigroupoid a) => a b c -> a c d -> a b d
7979 (>>>) f g = g <<< f
8080
81− -- | Categories consist of objects and composable morphisms between them, and as such are
82− -- | semigroupoids, but unlike semigroupoids must have an identity element.
81+ -- | `Category`s consist of objects and composable morphisms between them, and as such are
82+ -- | [`Semigroupoids`](#Semigroupoid), but unlike `semigroupoids` must have an identity element.
8383 -- |
84− -- | Categories should obey the following rules.
85− -- |
86− -- | Association (as semigroupoids)
87− -- | forall p q r. p <<< (q <<< r) = (p <<< q) <<< r
84+ -- | `Category`s should obey the following rules.
8885 -- |
8986 -- | Left Identity
9087 -- | forall p. id <<< p = p
@@ -170,10 +167,10 @@ module Prelude
170167 infixl 4 <$>
171168 infixl 1 <#>
172169
173− -- | A Functor is intuitively a type which can be mapped over, and more formally a mapping
174− -- | between categories that preserves structure.
170+ -- | A `Functor` is intuitively a type which can be mapped over, and more formally a mapping
171+ -- | between [`Category`](#Category)s that preserves structure.
175172 -- |
176− -- | Functors should obey the following rules.
173+ -- | `Functor`s should obey the following rules.
177174 -- |
178175 -- | Identity
179176 -- | (<$>) id = id
@@ -192,10 +189,10 @@ module Prelude
192189
193190 infixl 4 <*>
194191
195− -- | Applys are intuitively Applicatives less `pure`, and more formally a strong lax semi-
196− -- | -monoidal endofunctor.
192+ -- | `Apply`s are intuitively [`Applicative`](#Applicative)s less `pure`, and more formally a
193+ -- | strong lax semi-monoidal endofunctor.
197194 -- |
198− -- | Applys should obey the following rules.
195+ -- | `Apply`s should obey the following rules.
199196 -- |
200197 -- | Associative Composition
201198 -- | forall f g h. (.) <$> f <*> g <*> h = f <*> (g <*> h)
@@ -203,10 +200,10 @@ module Prelude
203200 class (Functor f) <= Apply f where
204201 (<*>) :: forall a b. f (a -> b) -> f a -> f b
205202
206− -- | Applicatives are Functors which can be "applied" by sequencing composition (<*>) or embedding
207− -- | pure expressions (pure).
203+ -- | `Applicative`s are [`Functor`](#Functor)s which can be "applied" by sequencing composition
204+ -- | (`<*>`) or embedding pure expressions (`pure`).
208205 -- |
209− -- | Applicatives should obey the following rules.
206+ -- | `Applicative`s should obey the following rules.
210207 -- |
211208 -- | Identity
212209 -- | forall v. (pure id) <*> v = v
@@ -228,23 +225,20 @@ module Prelude
228225
229226 infixl 1 >>=
230227
231− -- | A Bind is an Apply with a bind operation which sequentially composes actions.
228+ -- | A `Bind` is an [`Apply`](#Apply) with a bind operation which sequentially composes actions.
232229 -- |
233− -- | A Bind should obey the following rule.
230+ -- | `Bind`s should obey the following rule.
234231 -- |
235− -- | Associative (as Bind)
232+ -- | Associativity
236233 -- | forall f g x. (x >>= f) >>= g = x >>= (\k => f k >>= g)
237234 -- |
238235 class (Apply m) <= Bind m where
239236 (>>=) :: forall a b. m a -> (a -> m b) -> m b
240237
241− -- | Monad is a class which can be intuitively thought of as an abstract datatype of actions or
238+ -- | `Monad` is a class which can be intuitively thought of as an abstract datatype of actions or
242239 -- | more formally though of as a monoid in the category of endofunctors.
243240 -- |
244− -- | A Monad should obey the following rules.
245− -- |
246− -- | Associative (as Bind)
247− -- | forall f g x. (x >>= f) >>= g = x >>= (\k => f k >>= g)
241+ -- | `Monad`s should obey the following rules.
248242 -- |
249243 -- | Left Identity
250244 -- | forall f x. pure x >>= f = f x