Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

SEXP-parser in LISP

Name: Anonymous 2010-12-27 20:55


parseWS xs -> all \Space xs
parseNumber [@xs] -> if (all digit? xs) then asBase 10 xs
parseSymbol [@xs] -> if (all alpha? xs) then asSymbol xs
parseRest x -> x.{[] => 'nil; [@!WS] => 'nil
                  [\Space @!WS e:!Sexp es:!Rest] => if es=='nil [e] [e@es]}
parseList xs -> parseRest [\Space @xs]
parseSexp x -> x.{[e:!Number]=>e; [e:!Symbol]=>e
                  [\( @!WS es:!List \)] => e}

Name: >>24 2010-12-29 8:20

>>29
That would be explaining the meaning of one definition of one word. In your example, it would be difficult as the concept is self-contradictory and I don't see how logically fallacious concepts can exist (at least if you take the entire book as true).

What I actually meant about my "true meaning" part was more about a human mind being able to resolve ambiguity in human language by integrating context. While in some cases resolving ambiguity and getting to more raw "truths" may be needed, I meant something more casual in my example.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List