We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdc0c0d commit 6602ee4Copy full SHA for 6602ee4
src/Data/ArrayBuffer/Typed.purs
@@ -403,9 +403,7 @@ foreign import unsafeAtImpl :: forall a b. EffectFn2 (ArrayView a) Offset b
403
404
-- | Fetch element at index.
405
at :: forall a t. TypedArray a t => ArrayView a -> Offset -> Effect (Maybe t)
406
-at a n = if a `hasIndex` n
407
- then Just <$> unsafePartial (unsafeAt a n)
408
- else pure Nothing
+at a n = toMaybe <$> runEffectFn2 unsafeAtImpl a n
409
410
infixl 3 at as !
411
0 commit comments