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
insertAt :: forall a. Int -> a -> NonEmptyArray a -> Maybe (NonEmptyArray a)
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)
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)
insertAt :: forall a. Int -> a -> NonEmptyList a -> Maybe (NonEmptyList a)
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.
insertAt :: forall a. Eq a => Int -> a -> OSet a -> Maybe (OSet a)
InsertAt :: forall a da. Int -> a -> ArrayChange a da
insertAt :: forall da a. Patch a da => Int -> a -> Change (IArray a)
insertAt :: forall a. Int -> a -> ArrayView a -> Maybe (ArrayView a)
insertAt :: forall a. Int -> a -> NonEmptyArrayView a -> Maybe (NonEmptyArrayView a)
InsertAt :: forall value. Int -> value -> Update value
insertAt :: forall a. Int -> a -> List a -> List a
insertAt :: forall f a. Container f => Int -> a -> f a -> Maybe (f a)
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))
.
insertAt_ :: forall n. Int -> n -> List_ n -> Effect Unit
insertAt_ :: forall p @g. IsPanel p => IsGraphObject g => Number -> g -> p -> Effect Unit
InsertAtEnd :: UpdateDraftBodyType
InsertAtStart :: UpdateDraftBodyType
No further results.