3 ms·
Lisp is no more 'inside to out' than any other programming language, it just uses the same syntax for each subclause where other languages randomly choose diffe
by sbmassey 9y ago
Lisp is no more 'inside to out' than any other programming language, it just uses the same syntax for each subclause where other languages randomly choose different syntaxes for different kinds of expressions, so C
if (a == 0) { printf("color %s", b[i]); }
might be lispified
(if (= a 0) (format t "color ~A" (aref b i)))
- FrozenVoid 9y agoA better example: #include <stdio.h> #include <stdlib.h> #define ifl(op,a,b, ctrue,cfalse) if(a op b){ctrue ;}else{cfalse ;} #define strtolong(x) strtol(x,NULL,10) int main(int argc,char**argv){ if(argc<3){ puts("2 args req"); exit(1);} ifl(>,strtolong(argv[1]),strtolong(argv[2]),puts("Arg1: > Arg2:"),puts("Arg1: <= Arg2:")); ;}