Skip to content

Instantly share code, notes, and snippets.

View Iiridayn's full-sized avatar

Michael Clark Iiridayn

View GitHub Profile
class Link:
"""A linked list."""
empty = ()
def __init__(self, first, rest=empty):
assert rest is Link.empty or isinstance(rest, Link)
self.first = first
self.rest = rest
def __repr__(self):