Skip to content
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

added transpose #9

Closed
wants to merge 1 commit into from
Closed

added transpose #9

wants to merge 1 commit into from

Conversation

sindikat
Copy link
Contributor

I use transpose a lot, because I use 2D arrays a lot when writing games in Elm, so I think transpose is justified. According to an SO question on JS's array length, length's time complexity should be constant, so there should be no performance problems with using array length in code.

@jonboiser
Copy link
Collaborator

Thanks for the pull request. I'll take a closer look at the implementation later, but would you mind adding some examples as a doc string?

Examples with matrices of varying dimensions and types would be nice.

@lue-bird
Copy link
Collaborator

If we do, we should consider how to handle non-rectangular 2d arrays: elm-community/list-extra#83 (comment)

@lue-bird
Copy link
Collaborator

lue-bird commented Aug 15, 2021

So maybe just add this PR to Array2D which is guaranteed to be rectangular.

@lue-bird lue-bird closed this Sep 7, 2022
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.

None yet

3 participants