Skip to content

Conversation

@DZakh
Copy link
Member

@DZakh DZakh commented Dec 11, 2023

No description provided.

@DZakh DZakh force-pushed the array-documentation-improvements branch from f5e3785 to d767be9 Compare December 11, 2023 15:14
Test.run(__POS_OF__("make"), Array.make(~length=6, 7), eq, [7, 7, 7, 7, 7, 7])

Test.run(__POS_OF__("getUnsafe - existing"), [0, 1, 2]->Array.getUnsafe(1), eq, 1)
Test.run(__POS_OF__("getUnsafe - missing"), [0, 1, 2]->Array.getUnsafe(10), eq, %raw(`undefined`))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice it happened not to raise 😅

@zth
Copy link
Member

zth commented Dec 11, 2023

So the existing fn is wrong...?

@DZakh
Copy link
Member Author

DZakh commented Dec 11, 2023

If you're talking about Array.getUnsafe, I think it works as it should. What was wrong is the docstrings.

@DZakh
Copy link
Member Author

DZakh commented Dec 21, 2023

@zth What about merging the PR?

@dsiu
Copy link

dsiu commented Dec 31, 2023

If you're talking about Array.getUnsafe, I think it works as it should. What was wrong is the docstrings.

Yup. It works as it should just like JS but the doc was incorrect. Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants