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

Commit 4aecebb

Browse files
committed
use Data.Map.keys in toList
implements #29
1 parent 6f63c1a commit 4aecebb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Data/Set.purs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import Prelude
2929
import Data.Foldable (Foldable, foldMap, foldl, foldr)
3030
import Data.List (List())
3131
import Data.Monoid (Monoid)
32-
import Data.Tuple (fst)
3332
import qualified Data.Map as M
3433

3534
import Control.Monad.Eff (runPure, Eff())
@@ -102,7 +101,7 @@ fromFoldable = foldl (\m a -> insert a m) empty
102101

103102
-- | Convert a set to a list
104103
toList :: forall a. Set a -> List a
105-
toList (Set m) = map fst (M.toList m)
104+
toList (Set m) = M.keys m
106105

107106
-- | Create a set from a list of elements
108107
fromList :: forall a. (Ord a) => List a -> Set a

0 commit comments

Comments
 (0)