Skip to content

Commit

Permalink
Merge pull request #92 from purescript/phil/discards
Browse files Browse the repository at this point in the history
Avoid Discard constraints
  • Loading branch information
paf31 authored Feb 14, 2017
2 parents 1c2ec49 + 247a162 commit 1e56c03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Array/ST/Iterator.purs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ iterate iter f = do
next :: forall a h r. Iterator h a -> Eff (st :: ST h | r) (Maybe a)
next (Iterator f currentIndex) = do
i <- readSTRef currentIndex
modifySTRef currentIndex (_ + 1)
_ <- modifySTRef currentIndex (_ + 1)
pure (f i)

-- | Get the next item out of an iterator without advancing it.
Expand All @@ -67,7 +67,7 @@ pushWhile p iter array = do
mx <- peek iter
case mx of
Just x | p x -> do
pushSTArray array x
_ <- pushSTArray array x
void $ next iter
_ ->
void $ writeSTRef break true
Expand Down

0 comments on commit 1e56c03

Please sign in to comment.