Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Generic-swap/Maxima/generic-swap.maxima
Normal file
16
Task/Generic-swap/Maxima/generic-swap.maxima
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
a: 10$
|
||||
b: foo$
|
||||
|
||||
/* A simple way to swap values */
|
||||
[a, b]: [b, a]$
|
||||
|
||||
a; /* foo */
|
||||
b; /* 10 */
|
||||
|
||||
/* A macro to hide this */
|
||||
swap(x, y) ::= buildq([x, y], ([x, y]: [y, x], 'done))$
|
||||
|
||||
swap(a, b)$
|
||||
|
||||
a; /* 10 */
|
||||
b; /* foo */
|
||||
Loading…
Add table
Add a link
Reference in a new issue