Skip to content

Commit d1c5a2b

Browse files
committed
Removed note about subArray, the behaviour seems correct
1 parent 3cfed24 commit d1c5a2b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/Data/ArrayBuffer/Typed.purs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,6 @@ sort a = runEffectFn1 sortImpl a
376376
foreign import subArrayImpl :: forall a. Fn3 (ArrayView a) Offset Offset (ArrayView a)
377377

378378
-- | Returns a new typed array view of the same buffer, beginning at the index and ending at the second.
379-
-- |
380-
-- | **Note**: there is really peculiar behavior with `subArray` - if the first offset argument is omitted, or
381-
-- | is `0`, and likewise if the second argument is the length of the array, then the "sub-array" is actually a
382-
-- | mutable replica of the original array - the sub-array reference reflects mutations to the original array.
383-
-- | However, when the sub-array is is actually a smaller contiguous portion of the array, then it behaves
384-
-- | purely, because JavaScript interally calls `Data.ArrayBuffer.ArrayBuffer.slice`.
385379
subArray :: forall a. Offset -> Offset -> ArrayView a -> ArrayView a
386380
subArray s e a = runFn3 subArrayImpl a s e
387381

0 commit comments

Comments
 (0)