Search results

singleton :: forall a. a -> Array a

Create an array of one element

P purescript-arrays M Data.Array
singleton :: Octet -> ByteString

O(1) A byte string with a single byte.

P purescript-bytestrings M Data.ByteString
singleton :: forall a. a -> List a

Create a list with a single element.

Running time: O(1)

P purescript-lists M Data.List
singleton :: forall a. a -> List a

Create a list with a single element.

Running time: O(1)

P purescript-lists M Data.List.Lazy
singleton :: forall a. a -> NonEmptyList a
P purescript-lists M Data.List.Lazy.NonEmpty
singleton :: forall a. a -> NonEmptyList a
P purescript-lists M Data.List.NonEmpty
singleton :: forall f s a. Monad f => a -> MealyT f s a
P purescript-machines M Data.Machine.Mealy
singleton :: forall k v. k -> v -> Map k v

Create a map with one key/value pair

P purescript-maps M Data.Map
singleton :: forall a. String -> a -> StrMap a

Create a map with one key/value pair

P purescript-maps M Data.StrMap
singleton :: forall f a. Plus f => a -> NonEmpty f a

Create a non-empty structure with a single value.

P purescript-nonempty M Data.NonEmpty
singleton :: forall a. a -> Observable a

Make an observable which only yields the provided value on the next tick, then immediately closes.

P purescript-observable M Control.Observable
singleton :: forall p a. p -> a -> PQueue p a

Create a queue with a single element.

P purescript-pqueue M Data.PQueue
singleton :: forall a. a -> Seq a

O(1). Create a Seq with one element.

P purescript-sequences M Data.Sequence
singleton :: forall a. a -> Seq a

O(1). Construct a sequence from a single element.

P purescript-sequences M Data.Sequence.NonEmpty
singleton :: forall a. a -> Set a

Create a set with one element

P purescript-sets M Data.Set
singleton :: forall a. a -> Vec D1 a

Construct a vector containing only a single element.

P purescript-sized-vectors M Data.Vec
singleton :: Char -> String

Returns a string of length 1 containing the given character.

P purescript-strings M Data.String
singleton :: forall f a. Applicative f => a -> ListT f a

Create a list with one element.

P purescript-transformers M Control.Monad.List.Trans
singleton :: forall f a. Unfoldable f => a -> f a

Contain a single value. For example:

singleton "foo" == ["foo"] :: Array String
P purescript-unfoldable M Data.Unfoldable