singleton :: (Eq k) => k -> v -> FunMap k v
singleton key value = FunMap f
    where f x | x == key  = Just value
              | otherwise = Nothing


-- | Inserts an element into the FunMap.
--
-- Overwrites earlier elements if they share the same keys.
singleton :: (Eq k) => k -> v -> FunMap k v
singleton key value = FunMap f
    where f x | x == key  = Just value
              | otherwise = Nothing


-- | Inserts an element into the FunMap.
--
-- Overwrites earlier elements if they share the same keys.
singleton key value = FunMap f
    where f x | x == key  = Just value
              | otherwise = Nothing


-- | Inserts an element into the FunMap.
--
-- Overwrites earlier elements if they share the same keys.