Skip to content

Why does splitAt return an array instead of a Tuple? #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MichaelXavier opened this issue Oct 22, 2016 · 0 comments
Closed

Why does splitAt return an array instead of a Tuple? #69

MichaelXavier opened this issue Oct 22, 2016 · 0 comments

Comments

@MichaelXavier
Copy link

splitAt :: Int -> String -> Maybe (Array String). Looking at the FFI, it returns just([s.substring(0, i), s.substring(i)]) : nothing;, always either a Just with a 2-length array or a Nothing. Wouldn't a Tuple be more appropriate?

hdgarrood added a commit that referenced this issue Dec 1, 2016
hdgarrood added a commit that referenced this issue Dec 1, 2016
@garyb garyb closed this as completed in f7f449c Mar 26, 2017
garyb added a commit that referenced this issue Mar 26, 2017
[BREAKING] Make splitAt return a record, fixes #69
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

No branches or pull requests

1 participant