fromList package:ghc

Store the list in a flattened memory representation, avoiding the memory overhead of a linked list. The size n needs to be smaller or equal to the length of the list. If it is smaller than the length of the list, overflowing elements are discarded. It is undefined behaviour to set n to be bigger than the length of the list.
Turn a list into a Stream, by yielding each element in turn.
Create a map from a list of key/value pairs.
fromList [] == empty
fromList [(5,"a"), (3,"b"), (5, "c")] == fromList [(5,"c"), (3,"b")]
fromList [(5,"c"), (3,"b"), (5, "a")] == fromList [(5,"a"), (3,"b")]
Create a set from a list of integers.
Create a map from a list of key/value pairs with a combining function. See also fromAscListWith.
fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")] == fromList [(3, "ab"), (5, "cba")]
fromListWith (++) [] == empty
Build a map from a list of key/value pairs with a combining function. See also fromAscListWithKey'.
let f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value
fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")] == fromList [(3, "3:a|b"), (5, "5:c|5:b|a")]
fromListWithKey f [] == empty
Create a map from a list of key/value pairs with a combining function. See also fromAscListWith.
fromListWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "ab"), (5, "aba")]
fromListWith (++) [] == empty
Construct a JS HashMap from a list of key-value pairs