Skip to content

Commit 55cb9e6

Browse files
authored
Remove primes from foreign modules exports (#168)
1 parent a736205 commit 55cb9e6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Data/Array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ exports.snoc = function (l) {
103103
// Non-indexed reads -----------------------------------------------------------
104104
//------------------------------------------------------------------------------
105105

106-
exports["uncons'"] = function (empty) {
106+
exports.unconsImpl = function (empty) {
107107
return function (next) {
108108
return function (xs) {
109109
return xs.length === 0 ? empty({}) : next(xs[0])(xs.slice(1));

src/Data/Array.purs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ last xs = xs !! (length xs - 1)
309309
-- |
310310
-- | Running time: `O(n)` where `n` is the length of the array
311311
tail :: forall a. Array a -> Maybe (Array a)
312-
tail = uncons' (const Nothing) (\_ xs -> Just xs)
312+
tail = unconsImpl (const Nothing) (\_ xs -> Just xs)
313313

314314
-- | Get all but the last element of an array, creating a new array, or
315315
-- | `Nothing` if the array is empty.
@@ -340,9 +340,9 @@ init xs
340340
-- | Nothing -> somethingElse
341341
-- | ```
342342
uncons :: forall a. Array a -> Maybe { head :: a, tail :: Array a }
343-
uncons = uncons' (const Nothing) \x xs -> Just { head: x, tail: xs }
343+
uncons = unconsImpl (const Nothing) \x xs -> Just { head: x, tail: xs }
344344

345-
foreign import uncons'
345+
foreign import unconsImpl
346346
:: forall a b
347347
. (Unit -> b)
348348
-> (a -> Array a -> b)
@@ -1093,7 +1093,7 @@ unzip xs =
10931093
-- | ```
10941094
-- |
10951095
foldM :: forall m a b. Monad m => (a -> b -> m a) -> a -> Array b -> m a
1096-
foldM f a = uncons' (\_ -> pure a) (\b bs -> f a b >>= \a' -> foldM f a' bs)
1096+
foldM f a = unconsImpl (\_ -> pure a) (\b bs -> f a b >>= \a' -> foldM f a' bs)
10971097

10981098
foldRecM :: forall m a b. MonadRec m => (a -> b -> m a) -> a -> Array b -> m a
10991099
foldRecM f a array = tailRecM2 go a 0

0 commit comments

Comments
 (0)