Skip to content

Commit 30467f1

Browse files
committed
Merge pull request #20 from purescript/extend
Add extend
2 parents a559c91 + 996469d commit 30467f1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ Forwards co-Kleisli composition.
269269

270270
Backwards co-Kleisli composition.
271271

272+
#### `extend`
273+
274+
``` purescript
275+
extend :: forall b a w. (Extend w) => (w a -> b) -> w a -> w b
276+
```
277+
278+
An alias for `(<<=)`.
279+
272280
#### `duplicate`
273281

274282
``` purescript

src/Control/Extend.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ instance extendArr :: (Semigroup w) => Extend ((->) w) where
3535
(=<=) :: forall b a w c. (Extend w) => (w b -> c) -> (w a -> b) -> w a -> c
3636
(=<=) f g w = f (g <<= w)
3737

38+
-- | An alias for `(<<=)`.
39+
extend :: forall b a w. (Extend w) => (w a -> b) -> w a -> w b
40+
extend = (<<=)
41+
3842
-- | Duplicate a comonadic context.
3943
-- |
4044
-- | `duplicate` is dual to `Control.Bind.join`.

0 commit comments

Comments
 (0)