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: how to swap variables #27

Closed
ghost opened this issue Nov 3, 2019 · 1 comment
Closed

Suggestion: how to swap variables #27

ghost opened this issue Nov 3, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Nov 3, 2019

Is your feature request related to a problem? Please describe.
I wanted to know how to swap variables. Therefore, I looked for swap.
The current results are:

APL Phrase Explanation
X f⍨Y Commute: same as Y f X
Z f⍨X,Y Avoiding parentheses by swapping arguments in (X,Y) f Z
(¯11○+)N Swap real and imaginary
{⌽@(1,≢⍵)⊢⍵}Y Interchange first and last major cells
{n=≢∪n|⍵+⍳n←≢⍵}Jv Valid siteswap pattern?

These phrases do not allow me to perform this action.

Describe the solution you'd like
I would have included an APL phrase based on an example given in Bernard Legrand, Mastering Dyalog APL: A Complete Introduction to Dyalog APL (2009), Chapter X, B-5:

APL Phrase Explanation
X[4 6] ← X[6 4] Swap two variables

Describe alternatives you've considered
N/A

Additional context
I am a beginner APL programmer.

@ghost ghost added the bug Something isn't working label Nov 3, 2019
@ghost ghost assigned abrudz Nov 3, 2019
@ghost
Copy link
Author

ghost commented Nov 3, 2019

Unsuitably labelled as bug instead of content request.

@ghost ghost changed the title Add swap variables Suggestion: how to swap variables Nov 3, 2019
@abrudz abrudz added enhancement New feature or request and removed bug Something isn't working labels Nov 3, 2019
@abrudz abrudz closed this as completed in e5243a5 Nov 3, 2019
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

1 participant