summaryrefslogtreecommitdiff
path: root/MLKCons.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-10 16:52:52 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-10 16:52:52 +0200
commitbd264499c08c196aa2ce69702cba0829ab24788a (patch)
treecbead7c232beb7f9b789458d0bc3734960468e01 /MLKCons.m
Beginnings of a Lisp compiler.
Diffstat (limited to 'MLKCons.m')
-rw-r--r--MLKCons.m41
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
+