2323-- | - `foldr`, `foldrM`, `foldr1`, `foldr1M`, `foldl`, `foldlM`, `foldl1`, `foldl1M` all can reduce an array
2424-- | - `find` and `findIndex` are searching functions via a predicate
2525-- | - `indexOf` and `lastIndexOf` are searching functions via equality
26- -- | - `slice` returns a new typed array on the same array buffer content as the input
27- -- | - `subArray` returns a new typed array with a separate array buffer
26+ -- | - `slice` returns a new typed array with a new copied underlying `ArrayBuffer`
27+ -- | - `subArray` returns a new typed array view of the same `ArrayBuffer`
2828-- | - `toString` prints to a CSV, `join` allows you to supply the delimiter
2929-- | - `toArray` returns an array of numeric values
3030
@@ -211,7 +211,7 @@ set = setInternal A.length
211211ap1 :: forall a b c . (a -> c ) -> (a -> b -> c )
212212ap1 f = \x _ -> f x
213213
214- -- | Maps a new value over the typed array, creating a new buffer and
214+ -- | Maps a new value over the typed array, creating a new `ArrayBuffer` and
215215-- | typed array as well.
216216map :: forall a t . TypedArray a t => (t -> t ) -> ArrayView a -> ArrayView a
217217map = mapWithIndex' <<< ap1
@@ -415,7 +415,8 @@ foreign import setImpl :: forall a b. EffectFn3 (ArrayView a) Index b Unit
415415setTyped :: forall a . ArrayView a -> Maybe Index -> ArrayView a -> Effect Boolean
416416setTyped = setInternal length
417417
418- -- | Copy part of the contents of a typed array into a new buffer, between some start and end indices.
418+ -- | Copy part of the contents of a typed array into a new `ArrayBuffer`,
419+ -- | between the start and end indices.
419420slice :: forall a . Index -> Index -> ArrayView a -> Effect (ArrayView a )
420421slice s e a = runEffectFn3 sliceImpl a s e
421422
@@ -427,7 +428,8 @@ sort a = runEffectFn1 sortImpl a
427428
428429foreign import sortImpl :: forall a . EffectFn1 (ArrayView a ) Unit
429430
430- -- | Returns a new typed array view of the same buffer, beginning at the index and ending at the second.
431+ -- | Returns a new typed array view of the same `ArrayBuffer`, beginning at
432+ -- | the index and ending at the second.
431433subArray :: forall a . Index -> Index -> ArrayView a -> ArrayView a
432434subArray s e a = runFn3 subArrayImpl a s e
433435
0 commit comments