Search results

insertAt :: forall a. Int -> a -> Array a -> Maybe (Array a)

Insert an element at the specified index, creating a new array, or returning Nothing if the index is out of bounds.

insertAt 2 "!" ["Hello", "World"] = Just ["Hello", "World", "!"]
insertAt 10 "!" ["Hello"] = Nothing
P purescript-arrays M Data.Array
insertAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)
P purescript-arrays M Data.Array.NonEmpty
insertAt :: forall a. Int -> a -> List a -> Maybe (List a)

Insert an element into a list at the specified index, returning a new list or Nothing if the index is out-of-bounds.

Running time: O(n)

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

Insert an element into a list at the specified index, or append the element to the end of the list if the index is out-of-bounds, returning a new list.

Running time: O(n)

P purescript-lists M Data.List.Lazy
insertAt :: forall a. Int -> a -> NonEmptyList a -> Maybe (NonEmptyList a)
P purescript-lists M Data.List.NonEmpty
insertAt :: forall i s1 s2 a. Nat i => Lt i s1 => Succ s1 s2 => i -> a -> Vec s1 a -> Vec s2 a

Insert a value at a given index inside a vector, returning a vector that is one element larger.

P purescript-sized-vectors M Data.Vec
insertAt :: forall a. Eq a => Int -> a -> OSet a -> Maybe (OSet a)
P purescript-ordered-set M Data.Set.Ordered
InsertAt :: forall a da. Int -> a -> ArrayChange a da
P purescript-incremental-functions M Data.Incremental.Array
insertAt :: forall da a. Patch a da => Int -> a -> Change (IArray a)
P purescript-incremental-functions M Data.Incremental.Array
insertAt :: forall a. Int -> a -> ArrayView a -> Maybe (ArrayView a)
P purescript-array-views M Data.ArrayView
insertAt :: forall a. Int -> a -> NonEmptyArrayView a -> Maybe (NonEmptyArrayView a)
P purescript-array-views M Data.ArrayView.NonEmpty
InsertAt :: forall value. Int -> value -> Update value
P purescript-data-algebrae M Data.Algebra.Array
insertAt :: forall a. Int -> a -> List a -> List a
P purescript-infinite-lists M Data.List.Infinite
insertAt :: forall f a. Container f => Int -> a -> f a -> Maybe (f a)
P purescript-logoot-core M Data.Container
insertAt :: forall a. Int -> a -> List a -> Maybe (List a)

Insert an element at the specified index, creating a new list, or returning Nothing if the index is out of bounds.

If the specified index is one greater than the length of the list, the element is appended

Running time: O(log(n)).

P purescript-rrb-list M RRBList
insertAt_ :: forall n. Int -> n -> List_ n -> Effect Unit
P purescript-gojs M GoJS.Collection
insertAt_ :: forall p @g. IsPanel p => IsGraphObject g => Number -> g -> p -> Effect Unit
P purescript-gojs M GoJS.GraphObject.Panel.Methods
InsertAtEnd :: UpdateDraftBodyType
P purescript-google-apps M Data.Google.Apps.CardService.UpdateDraftBodyType
InsertAtStart :: UpdateDraftBodyType
P purescript-google-apps M Data.Google.Apps.CardService.UpdateDraftBodyType

No further results.