Skip to content

Commit bc1ce21

Browse files
Drop deprecated unfoldCofree (#124)
* Drop deprecated unfoldCofree * Add changelog entry
1 parent c7e482d commit bc1ce21

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Notable changes to this project are documented in this file. The format is based
77
Breaking changes:
88
- Update project and deps to PureScript v0.15.0 (#123 by @JordanMartinez)
99
- Drop deprecated `MonadZero` instance (#122 by @JordanMartinez)
10+
- Drop deprecated `unfoldCofree`; use `buildCofree` instead (#124 by @JordanMartinez)
1011

1112
New features:
1213

src/Control/Comonad/Cofree.purs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module Control.Comonad.Cofree
77
, head
88
, tail
99
, hoistCofree
10-
, unfoldCofree
1110
, buildCofree
1211
, explore
1312
, exploreM
@@ -61,17 +60,6 @@ tail (Cofree c) = snd (force c)
6160
hoistCofree :: forall f g. Functor f => (f ~> g) -> Cofree f ~> Cofree g
6261
hoistCofree nat (Cofree c) = Cofree (map (nat <<< map (hoistCofree nat)) <$> c)
6362

64-
-- | This signature is deprecated and will be replaced by `buildCofree` in a
65-
-- | future release.
66-
unfoldCofree
67-
:: forall f s a
68-
. Functor f
69-
=> (s -> a)
70-
-> (s -> f s)
71-
-> s
72-
-> Cofree f a
73-
unfoldCofree e n = buildCofree (\s -> Tuple (e s) (n s))
74-
7563
-- | Recursively unfolds a `Cofree` structure given a seed.
7664
buildCofree
7765
:: forall f s a

0 commit comments

Comments
 (0)