Skip to content

Instantly share code, notes, and snippets.

@jdp
jdp / refactor.py
Created December 7, 2010 04:59
A toy tail-recursive concatenative language implementation
#!/usr/bin/env python
import sys
import types
import operator
class Runtime:
def __init__(self, env={}, stack=[]):
self.env = {
# Primitive words, not an impressive base but it works