Skip to content

Instantly share code, notes, and snippets.

Open this in zkREPL →

This file can be included into other zkREPLs with include "gist:4149b97a72b4f51714620ecfaaf139fc";

@lajarre
lajarre / interpreter.py
Created November 3, 2020 15:12
Lisp parser and interpreter in Python
from datatypes import Atom, List, Expression
class Interpreter:
class InterpreterError(Exception):
pass
PROC_MAPPING = {"+": lambda *args: sum(args)}
ast: Expression