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.
singleton :: (Ord k, MonoidNull v) => k -> v -> MonoidMap k vmonoidmap Data.MonoidMap Constructs a MonoidMap from a single key-value pair. Satisfies the following property:
get k (singleton k v) == v
Nullifying the value for key k produces an empty map:nullify k (singleton k v) == empty
singleton :: a -> NonEmptyVector anonempty-vector Data.Vector.NonEmpty O(1) Non-empty vector with exactly one element
>>> singleton "a" ["a"]
singleton :: a -> SortedList asorted-list Data.SortedList O(1). Create a sorted list with only one element.
singleton :: forall (comp :: Nat) . KnownNat comp => Double -> TDigest comptdigest Data.TDigest.Tree Make a TDigest of a single data point.
singleton :: forall (comp :: Nat) . KnownNat comp => Double -> TDigest comptdigest Data.TDigest.Tree.Internal Make a TDigest of a single data point.
singleton :: forall (comp :: Nat) . KnownNat comp => Double -> TDigest comptdigest Data.TDigest.Tree.NonEmpty No documentation available.
singleton :: forall (comp :: Nat) . Double -> TDigest comptdigest Data.TDigest.Vector Make a TDigest of a single data point.
singleton :: forall (comp :: Nat) . Double -> TDigest comptdigest Data.TDigest.Vector.Internal Make a TDigest of a single data point.
singleton :: element -> Builder elementvector-builder VectorBuilder.Builder Builder of a single element.
-
LambdaHack Game.LambdaHack.Core.Prelude Construct a list from a single element.
Examples
>>> singleton True [True]
>>> singleton [1, 2, 3] [[1,2,3]]
>>> singleton 'c' "c"