File: reverse.azm

package info (click to toggle)
zoem 21-341-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,980 kB
  • sloc: ansic: 9,386; sh: 1,113; makefile: 108
file content (15 lines) | stat: -rw-r--r-- 312 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

\formatted{
\def{reverse#1}{
   \push{user}    \: being paranoid.
   \set{_a}{}
   \apply{_#1{\!setx{_a}{{\!1}\!_a}}}{\1}
   \: apply creates _#1{\setx{_a}{{\1}\_a}}
   \_a
   \pop{user}
}}

\set{list}{{1}{2}{3}{\!reverse{{a}{b}{c}}}{4}{5}{6}}
before: \apply{protect#1}{{\list}}
after : \reverse{\eval{\list}}