3 ms·
Well since it is s-expresssions (those paren things, looks like lisp), it is also very similar to JSON objects or XML elements. If you want to convert it to HT
by yjgyhj 11y ago
Well since it is s-expresssions (those paren things, looks like lisp), it is also very similar to JSON objects or XML elements.
If you want to convert it to HTML you could do pretty easily. Use the car & cdr functions in lisp, and transform every car into a string like this `"<" + symbol + ">"`. Convert the closing paren to `"</" + symbol + ">"`. In the middle you put the result of cdr. https://en.wikipedia.org/wiki/CAR_and_CDR https://en.wikipedia.org/wiki/CAR_and_CDR
Writing LISP is basically writing the AST without hiding it behind a textual syntax. The only textual syntax is the paren symbols that delimit the nodes in the syntax tree. It's a simpler way to live.