From bd264499c08c196aa2ce69702cba0829ab24788a Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Tue, 10 Jun 2008 16:52:52 +0200 Subject: Beginnings of a Lisp compiler. --- MLKCons.m | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 MLKCons.m (limited to 'MLKCons.m') diff --git a/MLKCons.m b/MLKCons.m new file mode 100644 index 0000000..e9e6360 --- /dev/null +++ b/MLKCons.m @@ -0,0 +1,41 @@ +/* -*- mode: objc; coding: utf-8 -*- */ +/* Copyright 2008, Matthias Benkard. */ + +#import "MLKCons.h" + + +@implementation MLKCons ++(MLKCons*) cons:(id)car with:(id)cdr +{ + return AUTORELEASE ([[MLKCons alloc] initWithCar:car cdr:cdr]); +} + +-(MLKCons*) initWithCar:(id)car cdr:(id)cdr +{ + ASSIGN (_car, car); + ASSIGN (_cdr, cdr); + return self; +} + + +-(id) car +{ + return _car; +} + +-(id) cdr +{ + return _cdr; +} + +-(void) setCar:(id)value +{ + ASSIGN (_car, value); +} + +-(void) setCdr:(id)value +{ + ASSIGN (_cdr, value); +} +@end + -- cgit v1.2.3