turn function add(1, 4) into (add, 1, 4)

I have been experimenting with using functions to make a mini programming language, but can’t find out how to turn the function add(1, 4) into (add, 1, 4) So far I have this: mem = {} def inp(text): return(input(text)) def store(name, value): mem[str(name)] = value def get(name): return(mem[str(name)]) def ifel(con, exp1, exp2): if con ==… Read More turn function add(1, 4) into (add, 1, 4)

How to present string operations, e.g. string replace, by math notations

I attempt to describe an algorithm in the paper, and the algorithm is about string replace operation. The algorithm is complex, so a simple example is given instead as follows: For a given number serial, all "1" will be replaced by "a" How to present the procedure in math notation for an abstract, and general… Read More How to present string operations, e.g. string replace, by math notations