Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 53f5b22

Browse files
committed
Switch fromArray -> fromFoldable
1 parent d74c278 commit 53f5b22

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Data/Set.purs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ properSubset s1 s2 = subset s1 s2 && (s1 /= s2)
139139

140140
-- | The set of elements which are in both the first and second set
141141
intersection :: forall a. (Ord a) => Set a -> Set a -> Set a
142-
intersection s1 s2 = fromArray $ runPure (runSTArray (emptySTArray >>= intersect)) where
142+
intersection s1 s2 = fromFoldable $ runPure (runSTArray (emptySTArray >>= intersect)) where
143143
ls = toArray s1
144144
rs = toArray s2
145145
ll = length ls
@@ -158,6 +158,3 @@ intersection s1 s2 = fromArray $ runPure (runSTArray (emptySTArray >>= intersect
158158

159159
toArray :: forall a. (Ord a) => Set a -> Array a
160160
toArray = List.fromList <<< toList
161-
162-
fromArray :: forall a. (Ord a) => Array a -> Set a
163-
fromArray = fromList <<< List.toList

0 commit comments

Comments
 (0)