FpInt :: "FpInt".
FpFlo :: "FpFlo".
FpBool :: "FpBool".
PTInt :: "PTInt".
PTFlo :: "PTFlo".
PTStr :: "PTStr".
PTBool :: "PTBool".
PTErr :: "PTErr".
ParInt:: "ParInt".
ParFlo:: "ParFlo".
ParBool:: "ParBool".
ParStr:: "ParStr".

I NUM :: "%".
F NUM :: "&".
STRING :: "$".
BOOL :: "?".
T or F :: @ meta bool (x>).

meta bool (True>): "True", ->;
meta bool (False>): "False".

True :: "True".
False :: "False".


atom application (>org,>name,>node):
    where (>node,VApply*args*result>), ->,
    trans val (>args, >args, >empty),
    trans val (>result, >result, >empty),
    make atom arg list (>args, rev list>),
    reverse atom arg list (>rev list, list>),
    where (>LIST*list,atom par list>),
    repair (>node,>VAtom,>org*name*atom par list*result);
atom application (>org,>name,>vapp):
    .
make atom arg list (>VApply * rest * arg,  arg *rest list>): 
     make atom arg list (>rest, rest list>), ->;
make atom arg list (>VValApply * rest * arg, arg * rest list>): 
    trans val (>rest, >rest, >empty),
    trans val (>arg, >arg, >empty),
    make atom arg list (>rest, rest list>), ->;
make atom arg list (> _, empty>): .

reverse atom arg list (>empty,empty>): ->;
reverse atom arg list (>x * y, z>): 
     reverse atom arg list (>y, rev y>),
     append  (>rev y, >x , z>).

append  (>empty, >x, x*empty>): ->;
append  (>y*empty, >x, y*x*empty>): ->;
append  (>h*t, >x, h* new tail>):
    append (>t,>x, new tail>).

%$TEX
\input \jobname.ind
\end{document}
%
