3 ms·
What is "Lisp style C"? Can you link an example?
by jstimpfle 8y ago
What is "Lisp style C"? Can you link an example?
- nicklaf 8y agoI can't find it, but I remember seeing a linked list library for C, which supported a functional style like Lisp. I don't know how closely it was related to S-expressions, but I'd be interested if somebody could help me remember what I'm thinking of here.
- mschaef 8y agoI tend to think of George Carette's SIOD Scheme interpreter when I think of "Lisp style C": LISP difference(LISP x,LISP y) {if NFLONUMP(x) err("wta(1st) to difference",x); if NULLP(y) return(flocons(-FLONM(x))); else {if NFLONUMP(y) err("wta(2nd) to difference",y); return(flocons(FLONM(x) - FLONM(y)));}} http://people.delphiforums.com/gjc/siod.html http://people.delphiforums.com/gjc/siod.html Of course, that's a Scheme interpreter, so it might be at least a little expected.