module Music.Theory.Set.Set where
import qualified Data.Set as S
import qualified Music.Theory.Set.List as L
set :: (Ord a) => [a] -> S.Set a
set :: forall a. Ord a => [a] -> Set a
set = forall a. Ord a => [a] -> Set a
S.fromList
powerset :: Ord a => S.Set a -> S.Set (S.Set a)
powerset :: forall a. Ord a => Set a -> Set (Set a)
powerset = forall a. Ord a => [a] -> Set a
S.fromList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b) -> [a] -> [b]
map forall a. Ord a => [a] -> Set a
S.fromList forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> [[a]]
L.powerset forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Set a -> [a]
S.elems
pairs :: Ord a => S.Set a -> S.Set (a,a)
pairs :: forall a. Ord a => Set a -> Set (a, a)
pairs = forall a. Ord a => [a] -> Set a
set forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> [(a, a)]
L.pairs forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Set a -> [a]
S.elems