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

Suggestion: invertible reshape #481

Open
bkDJ opened this issue Apr 12, 2024 · 2 comments
Open

Suggestion: invertible reshape #481

bkDJ opened this issue Apr 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@bkDJ
Copy link
Contributor

bkDJ commented Apr 12, 2024

Would it make sense for °↯ to behave like △.? It seems like it would be in line with °√ already behaving like ×..

(By the way, I'm loving the work on making more of the language invertible. Sometimes if I'm writing a function that needs to go both ways, like before/after serialization, more and more is automatically invertible so only one or two bits need to be wrapped in a setinv. This suggestion stems from trying to remove as many setinvs as I can from my code)

@kaikalii
Copy link
Member

Perhaps. I wonder if △. or ⊃△♭ would be more useful.

@bkDJ
Copy link
Contributor Author

bkDJ commented Apr 12, 2024

Good question. You know best which would make more sense. My main motivation was just to be able to write something like F ← Foo △. with the expectation that °F will "just work" if Foo is invertible too. But ⊃△♭ might indeed be the more general inversion, so I'd vote for that.

@kaikalii kaikalii added the enhancement New feature or request label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants