Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fromList :: Ord a => [a] -> Heap aheaps Data.Heap O(n). Build a heap from a list of values.
fromList . toList ≡ id toList . fromList ≡ sort
fromList :: FromList ss => (forall (s :: k) . () => a -> t s) -> [a] -> PL t sshetero-parameter-list Data.HeteroParList No documentation available.
fromList :: (Ord k, MonoidNull v) => [(k, v)] -> MonoidMap k vmonoidmap Data.MonoidMap Constructs a MonoidMap from a list of key-value pairs. If the list contains more than one value for the same key, values are combined together in the order that they appear with the (<>) operator. Satisfies the following property for all possible keys k:
get k (fromList kvs) == foldMap snd (filter ((== k) . fst) kvs)
Satisfies the following round-trip property:fromList (toList m) == m
Examples
With String values:>>> fromList [(1,"a"), (2,"x"), (1,"b"), (2,"y"), (1,"c"), (2,"z")] fromList [(1,"abc"), (2,"xyz")]
fromList :: [a] -> Maybe (NonEmptyVector a)nonempty-vector Data.Vector.NonEmpty O(n) Convert from a list to a non-empty vector.
>>> fromList [1..3] Just [1,2,3]
>>> fromList [] Nothing
fromList :: Num p => [(p, a)] -> Categorical p arandom-fu Data.Random.Distribution.Categorical Construct a Categorical distribution from a list of weighted categories.
fromList :: (Shape sh, Target r e) => sh -> [e] -> Array r sh erepa Data.Array.Repa.Eval O(n). Construct a manifest array from a list.
-
vector-hashtables Data.Vector.Hashtables O(n) Convert list to a Dictionary.
-
vector-hashtables Data.Vector.Hashtables.Internal O(n) Convert list to a Dictionary.
fromList :: [(CellRef, Comment)] -> CommentTablexlsx Codec.Xlsx.Types.Internal.CommentTable No documentation available.
fromList :: [(Text, Variant)] -> CustomPropertiesxlsx Codec.Xlsx.Types.Internal.CustomProperties No documentation available.