Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
appendList :: NonEmpty a -> [a] -> NonEmpty abase Data.List.NonEmpty Attach a list at the end of a NonEmpty.
>>> appendList (1 :| [2,3]) [] 1 :| [2,3]
>>> appendList (1 :| [2,3]) [4,5] 1 :| [2,3,4,5]
fromList :: HasCallStack => [a] -> NonEmpty abase Data.List.NonEmpty Converts a normal list to a NonEmpty stream. Raises an error if given an empty list.
prependList :: [a] -> NonEmpty a -> NonEmpty abase Data.List.NonEmpty Attach a list at the beginning of a NonEmpty.
>>> prependList [] (1 :| [2,3]) 1 :| [2,3]
>>> prependList [negate 1, 0] (1 :| [2, 3]) -1 :| [0,1,2,3]
-
base Data.List.NonEmpty Convert a stream to a normal list efficiently.
primMapListBounded :: BoundedPrim a -> [a] -> Builderbytestring Data.ByteString.Builder.Prim Create a Builder that encodes a list of values consecutively using a BoundedPrim for each element. This function is more efficient than
mconcat . map (primBounded w)
orfoldMap (primBounded w)
because it moves several variables out of the inner loop.primMapListFixed :: FixedPrim a -> [a] -> Builderbytestring Data.ByteString.Builder.Prim Encode a list of values from left-to-right with a FixedPrim.
toList :: Array -> Int -> Int -> [Word8]text Data.Text.Array Convert an immutable array to a list.
-
text Data.Text.Internal.Fusion.Common O(n) Convert a list into a Stream. Properties
unstream . streamList = pack
unstreamList :: Stream a -> [a]text Data.Text.Internal.Fusion.Common O(n) Convert a Stream into a list. Properties
unstreamList . stream = unpack
fromAscList :: [(Key, a)] -> IntMap acontainers Data.IntMap.Internal Build a map from a list of key/value pairs where the keys are in ascending order.
fromAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] fromAscList [(3,"b"), (5,"a"), (5,"b")] == fromList [(3, "b"), (5, "b")]