union -base

union :: IntMap a -> IntMap a -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). The (left-biased) union of two maps. It prefers the first map when duplicate keys are encountered, i.e. (union == unionWith const). > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")]
union :: IntSet -> IntSet -> IntSet
containers Data.IntSet
O(n+m). The union of two sets.
union :: Ord a => Set a -> Set a -> Set a
containers Data.Set
O(n+m). The union of two sets, preferring the first set when equal elements are encountered. The implementation uses the efficient hedge-union algorithm.
union :: Ord k => Map k a -> Map k a -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
O(n+m). The expression (union t1 t2) takes the left-biased union of t1 and t2. It prefers t1 when duplicate keys are encountered, i.e. (union == unionWith const). The implementation uses the efficient hedge-union algorithm. > union (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "a"), (7, "C")]
package union-find
package
The Union/Find algorithm implements these operations in (effectively) constant-time: * Check whether two elements are in the same equivalence class. * Create a union of two equivalence classes. * Look up the descriptor of the equivalence class. Version 0.2
package union-find-array
package
ST based implementation of Tarjan's disjoint set forests, using mutable arrays storing indices instead of references internally. There is also a pure, immutable version of the data structure, which is useful for querying the result of a union find construction. Version 0.1
unionFileModes :: FileMode -> FileMode -> FileMode
unix System.Posix.Files.ByteString, unix System.Posix.Files
Combines the two file modes into one that contains modes that appear in either.
unions :: [IntMap a] -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
The union of a list of maps. > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] > == fromList [(3, "b"), (5, "a"), (7, "C")] > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])] > == fromList [(3, "B3"), (5, "A3"), (7, "C")]
unions :: [IntSet] -> IntSet
containers Data.IntSet
The union of a list of sets.
unions :: Ord a => [Set a] -> Set a
containers Data.Set
The union of a list of sets: (unions == foldl union empty).
unions :: Ord k => [Map k a] -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
The union of a list of maps: (unions == foldl union empty). > unions [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] > == fromList [(3, "b"), (5, "a"), (7, "C")] > unions [(fromList [(5, "A3"), (3, "B3")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "a"), (3, "b")])] > == fromList [(3, "B3"), (5, "A3"), (7, "C")]
unionsWith :: (a -> a -> a) -> [IntMap a] -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
The union of a list of maps, with a combining operation. > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
unionsWith :: Ord k => (a -> a -> a) -> [Map k a] -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
The union of a list of maps, with a combining operation: (unionsWith f == foldl (unionWith f) empty). > unionsWith (++) [(fromList [(5, "a"), (3, "b")]), (fromList [(5, "A"), (7, "C")]), (fromList [(5, "A3"), (3, "B3")])] > == fromList [(3, "bB3"), (5, "aAA3"), (7, "C")]
unionWith :: (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). The union with a combining function. > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")]
unionWith :: Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
O(n+m). Union with a combining function. The implementation uses the efficient hedge-union algorithm. > unionWith (++) (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "aA"), (7, "C")]
unionWithKey :: (Key -> a -> a -> a) -> IntMap a -> IntMap a -> IntMap a
containers Data.IntMap.Strict, containers Data.IntMap.Lazy
O(n+m). The union with a combining function. > let f key left_value right_value = (show key) ++ ":" ++ left_value ++ "|" ++ right_value > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:a|A"), (7, "C")]
unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
containers Data.Map.Lazy, containers Data.Map.Strict
O(n+m). Union with a combining function. The implementation uses the efficient hedge-union algorithm. > let f key left_value right_value = (show key) ++ ":" ++ left_value ++ "|" ++ right_value > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5, "5:a|A"), (7, "C")]
package funion
package
A unioning file-system using HFuse Version 0.0.2