4 ms·
Cool, only 70 lines!! (plus a ton of libraries) j/k ;-) Actually, I like this - it shows how cool Haskell really is! No, wait - it shows how cool Lisp really
by kleiba 16y ago
Cool, only 70 lines!!
(plus a ton of libraries)
j/k ;-) Actually, I like this - it shows how cool Haskell really is! No, wait - it shows how cool Lisp really is! No wait... I'm confused... :-)
- magoghm 16y ago"Actually, I like this - it shows how cool Haskell really is! No, wait - it shows how cool Lisp really is! No wait... I'm confused... :-)" <- +1
- eru 16y agoIf you like this, there's a more involved version: http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H...
- GregBuchholz 16y agoYou might also like: Lisprolog http://stud1.tuwien.ac.at/~e0225855/lisprolog/lisprolog.html http://stud1.tuwien.ac.at/~e0225855/lisprolog/lisprolog.html "Some online books show how to implement a simple "Prolog" engine in Lisp. They typically assume a representation of Prolog programs that is convenient from a Lisp perspective, and can't even parse a single proper Prolog term. Instead, they require you to manually translate Prolog programs to Lisp forms that are no longer valid Prolog syntax. With this approach, implementing a simple "Lisp" in Prolog is even easier ("Lisp in Prolog in zero lines"): Manually translate each Lisp function to a Prolog predicate with one additional argument to hold the original function's return value. Done. This is possible since a function is a special case of a relation, and functional programming is a restricted form of logic programming. Here is a bit beyond that: lisprolog.pl These 162 lines of Prolog code give you an interpreter for a simple Lisp, including a parser to let you write Lisp code in its natural form."