Skip to content

Commit

Permalink
Merge pull request #88 from mlang/NaturalTransformation
Browse files Browse the repository at this point in the history
Use ~>
  • Loading branch information
hdgarrood authored Jan 20, 2017
2 parents b1bab02 + a32cdf1 commit 178c916
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Array.purs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ import Data.Unfoldable (class Unfoldable, unfoldr)
import Partial.Unsafe (unsafePartial)

-- | Convert an `Array` into an `Unfoldable` structure.
toUnfoldable :: forall f a. Unfoldable f => Array a -> f a
toUnfoldable :: forall f. Unfoldable f => Array ~> f
toUnfoldable xs = unfoldr f 0
where
len = length xs
Expand All @@ -138,7 +138,7 @@ toUnfoldable xs = unfoldr f 0
| otherwise = Nothing

-- | Convert a `Foldable` structure into an `Array`.
fromFoldable :: forall f a. Foldable f => f a -> Array a
fromFoldable :: forall f. Foldable f => f ~> Array
fromFoldable = fromFoldableImpl foldr

foreign import fromFoldableImpl
Expand Down

0 comments on commit 178c916

Please sign in to comment.