S-expressions: Difference between revisions

m
(→‎{{header|Haskell}}: Additional output, expression serialized from parse tree.)
Line 3,133:
treeFromVal v = Node v []
 
------------------------ FORMATTINGSERIALIZING ----------------------
 
ppExpr trees = unwords (go <$> trees)
where
go (Node v xs) = "OK"
 
litVal (Symbol x) = x
Line 3,144 ⟶ 3,140:
litVal (String x) = '"' : x <> "\""
litVal (List [List xs]) = litVal (List xs)
litVal (List xs) = "'("' <>: (unwords (litVal <$> xs) <> ")")
 
------------------------- GENERIC ------------------------
9,655

edits