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 :: MonoPointed seq => Element seq -> seqclassy-prelude-yesod ClassyPrelude.Yesod Create a sequence from a single element.
> singleton a :: String "a" > singleton a :: Vector Char fromList "a"
singleton :: BoundedTrie -> Maybe [Text]gogol-dataflow Gogol.Dataflow A more efficient representation for metrics consisting of a single value.
singleton :: BoundedTrie -> Maybe [Text]gogol-dataflow Gogol.Dataflow.Types A more efficient representation for metrics consisting of a single value.
singleton :: Key k => TreeSetup -> k -> v -> Tree k vhaskey-btree Data.BTree.Pure Construct a tree containg one element.
-
hybrid-vectors Data.Vector.Hybrid O(1) Vector with exactly one element
-
listsafe Data.List.Safe Construct a list from a single element.
Examples
>>> singleton True [True]
>>> singleton [1, 2, 3] [[1,2,3]]
>>> singleton 'c' "c"
singleton :: a -> NonEmptySeq anon-empty-sequence Data.Sequence.NonEmpty Place a single item at the head of the NonEmptySeq.
singleton :: Hashable k => k -> a -> SomeHashMapWith (SingletonProof 'Hashed k) k arefined-containers Data.HashMap.Refined Create a map with a single key-value pair, and return a proof that the key is in the resulting map.
singleton :: Hashable k => k -> a -> SomeHashMapWith (SingletonProof 'Hashed k) k arefined-containers Data.HashMap.Strict.Refined Create a map with a single key-value pair, and return a proof that the key is in the resulting map.
singleton :: Hashable a => a -> SomeHashSetWith (SingletonProof 'Hashed a) arefined-containers Data.HashSet.Refined Create a set with a single element.