diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-10 16:52:52 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-10 16:52:52 +0200 |
commit | bd264499c08c196aa2ce69702cba0829ab24788a (patch) | |
tree | cbead7c232beb7f9b789458d0bc3734960468e01 /MLKCons.m |
Beginnings of a Lisp compiler.
Diffstat (limited to 'MLKCons.m')
-rw-r--r-- | MLKCons.m | 41 |
1 files changed, 41 insertions, 0 deletions
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 + |