Skip to content

Commit

Permalink
change unsafeThaw [] to empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sharno authored Feb 12, 2019
1 parent ab61f68 commit 8e90603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Data/Array.purs
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ nubBy comp xs = case head indexedAndSorted of
-- |
nubByEq :: forall a. (a -> a -> Boolean) -> Array a -> Array a
nubByEq eq xs = ST.run do
arr <- STA.unsafeThaw []
arr <- STA.empty
ST.foreach xs \x -> do
e <- not <<< Exports.any (_ `eq` x) <$> (STA.unsafeFreeze arr)
when e $ void $ STA.push x arr
Expand Down

0 comments on commit 8e90603

Please sign in to comment.