# LANGUAGE NoImplicitPrelude , UnicodeSyntax #

| 
 Module      : Data . IntMap . Lazy . Unicode 
 Copyright   : 2009–2012          : BSD3 ( see the file LICENSE ) 
 Maintainer :    <  > 

Module     : Data.IntMap.Lazy.Unicode
Copyright  : 2009–2012 Roel van Dijk
License    : BSD3 (see the file LICENSE)
Maintainer : Roel van Dijk <>
-}

module Data.IntMap.Strict.Unicode
    ( (∈), (∋), (∉), (∌)
    , (∅)
    , (∪), (∖), (∆), (∩)
    ) where


-------------------------------------------------------------------------------
-- Imports
-------------------------------------------------------------------------------

-- from base:
import Data.Bool     ( Bool )
import Data.Int      ( Int )
import Data.Function ( flip )

-- from containers:
import Data.IntMap.Strict ( IntMap
                          , member, notMember
                          , empty
                          , union, difference, intersection
                          )


-------------------------------------------------------------------------------
-- Fixities
-------------------------------------------------------------------------------

infix  4 ∈
infix  4 ∋
infix  4 ∉
infix  4 ∌
infixl 6 ∪
infixr 6 ∩
infixl 9 ∖
infixl 9 ∆


-------------------------------------------------------------------------------
-- Symbols
-------------------------------------------------------------------------------

{-|
(&#x2208;) = 'member'

U+2208, ELEMENT OF
-}
(∈) ∷ Int → IntMap α → Bool
(∈) = member
{-# INLINE (∈) #-}

{-|
(&#x220B;) = 'flip' (&#x2208;)

U+220B, CONTAINS AS MEMBER
-}
(∋) ∷ IntMap α → Int → Bool
(∋) = flip (∈)
{-# INLINE (∋) #-}

| 
 ( & # x2209 ;) = '  ' 

 U+2209 , NOT AN ELEMENT OF 

(&#x2209;) = 'notMember'

U+2209, NOT AN ELEMENT OF
-}
(∉) ∷ Int → IntMap α → Bool
(∉) = notMember
# INLINE ( ∉ ) #

{-|
(&#x220C;) = 'flip' (&#x2209;)

U+220C, DOES NOT CONTAIN AS MEMBER
-}
(∌) ∷ IntMap α → Int → Bool
(∌) = flip (∉)
# INLINE ( ∌ ) #

{-|
(&#x2205;) = 'empty'

U+2205, EMPTY SET
-}
(∅) ∷ IntMap α
(∅) = empty
{-# INLINE (∅) #-}

{-|
(&#x222A;) = 'union'

U+222A, UNION
-}
(∪) ∷ IntMap α → IntMap α → IntMap α
(∪) = union
{-# INLINE (∪) #-}

| 
 ( & # x2216 ;) = ' difference ' 

 U+2216 , SET MINUS 

(&#x2216;) = 'difference'

U+2216, SET MINUS
-}
(∖) ∷ IntMap α → IntMap β → IntMap α
(∖) = difference
{-# INLINE (∖) #-}

| 
 Symmetric difference 

 a & # x2206 ; b = ( a & # x2216 ; b ) & # x222A ; ( b & # x2216 ; a ) 

 U+2206 , INCREMENT 

Symmetric difference

a &#x2206; b = (a &#x2216; b) &#x222A; (b &#x2216; a)

U+2206, INCREMENT
-}
(∆) ∷ IntMap α → IntMap α → IntMap α
a ∆ b = (a ∖ b) ∪ (b ∖ a)
{-# INLINE (∆) #-}

| 
 ( & # x2229 ;) = ' intersection ' 

 U+2229 , INTERSECTION 

(&#x2229;) = 'intersection'

U+2229, INTERSECTION
-}
(∩) ∷ IntMap α → IntMap β → IntMap α
(∩) = intersection
{-# INLINE (∩) #-}


-----------------------------------------------------------------------------
 Imports
-----------------------------------------------------------------------------
 from base:
 from containers:
-----------------------------------------------------------------------------
 Fixities
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
 Symbols
-----------------------------------------------------------------------------
|
(&#x2208;) = 'member'

U+2208, ELEMENT OF

# INLINE (∈) #
|
(&#x220B;) = 'flip' (&#x2208;)

U+220B, CONTAINS AS MEMBER

# INLINE (∋) #
|
(&#x220C;) = 'flip' (&#x2209;)

U+220C, DOES NOT CONTAIN AS MEMBER

|
(&#x2205;) = 'empty'

U+2205, EMPTY SET

# INLINE (∅) #
|
(&#x222A;) = 'union'

U+222A, UNION

# INLINE (∪) #
# INLINE (∖) #
# INLINE (∆) #
# INLINE (∩) #
# LANGUAGE NoImplicitPrelude , UnicodeSyntax #

| 
 Module      : Data . IntMap . Lazy . Unicode 
 Copyright   : 2009–2012          : BSD3 ( see the file LICENSE ) 
 Maintainer :    <  > 

Module     : Data.IntMap.Lazy.Unicode
Copyright  : 2009–2012 Roel van Dijk
License    : BSD3 (see the file LICENSE)
Maintainer : Roel van Dijk <>
-}

module Data.IntMap.Strict.Unicode
    ( (∈), (∋), (∉), (∌)
    , (∅)
    , (∪), (∖), (∆), (∩)
    ) where



import Data.Bool     ( Bool )
import Data.Int      ( Int )
import Data.Function ( flip )

import Data.IntMap.Strict ( IntMap
                          , member, notMember
                          , empty
                          , union, difference, intersection
                          )



infix  4 ∈
infix  4 ∋
infix  4 ∉
infix  4 ∌
infixl 6 ∪
infixr 6 ∩
infixl 9 ∖
infixl 9 ∆



(∈) ∷ Int → IntMap α → Bool
(∈) = member

(∋) ∷ IntMap α → Int → Bool
(∋) = flip (∈)

| 
 ( & # x2209 ;) = '  ' 

 U+2209 , NOT AN ELEMENT OF 

(&#x2209;) = 'notMember'

U+2209, NOT AN ELEMENT OF
-}
(∉) ∷ Int → IntMap α → Bool
(∉) = notMember
# INLINE ( ∉ ) #

(∌) ∷ IntMap α → Int → Bool
(∌) = flip (∉)
# INLINE ( ∌ ) #

(∅) ∷ IntMap α
(∅) = empty

(∪) ∷ IntMap α → IntMap α → IntMap α
(∪) = union

| 
 ( & # x2216 ;) = ' difference ' 

 U+2216 , SET MINUS 

(&#x2216;) = 'difference'

U+2216, SET MINUS
-}
(∖) ∷ IntMap α → IntMap β → IntMap α
(∖) = difference

| 
 Symmetric difference 

 a & # x2206 ; b = ( a & # x2216 ; b ) & # x222A ; ( b & # x2216 ; a ) 

 U+2206 , INCREMENT 

Symmetric difference

a &#x2206; b = (a &#x2216; b) &#x222A; (b &#x2216; a)

U+2206, INCREMENT
-}
(∆) ∷ IntMap α → IntMap α → IntMap α
a ∆ b = (a ∖ b) ∪ (b ∖ a)

| 
 ( & # x2229 ;) = ' intersection ' 

 U+2229 , INTERSECTION 

(&#x2229;) = 'intersection'

U+2229, INTERSECTION
-}
(∩) ∷ IntMap α → IntMap β → IntMap α
(∩) = intersection

