*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 31 Mar 2006 19:54:24 +0200
changeset 1623 d93980e41a6a
parent 1622 8d855c16aab3
child 1624 1af2724496b2
*** empty log message ***
Cons.st
--- a/Cons.st	Fri Mar 31 11:14:46 2006 +0200
+++ b/Cons.st	Fri Mar 31 19:54:24 2006 +0200
@@ -116,6 +116,12 @@
     "
 !
 
+first
+    "return the head, first or car - whatever you wonna call it"
+
+    ^ self car
+!
+
 head
     "return the head, first or car - whatever you wonna call it"
 
@@ -168,6 +174,12 @@
     "
 !
 
+rest
+    "return the head, first or car - whatever you wonna call it"
+
+    ^ self cdr
+!
+
 reversed
     "for lispers:
      return a new list with the cars in reverse order"
@@ -247,6 +259,20 @@
     "set the tail, second or cdr - whatever you wonna call it"
 
     cdr := something.
+!
+
+first:carArg rest:cdrArg 
+    "set both car and cdr"
+
+    car := carArg.
+    cdr := cdrArg.
+!
+
+head:carArg tail:cdrArg 
+    "set both car and cdr"
+
+    car := carArg.
+    cdr := cdrArg.
 ! !
 
 !Cons methodsFor:'list processing'!
@@ -386,5 +412,5 @@
 !Cons class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Cons.st,v 1.7 2003-12-09 14:26:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Cons.st,v 1.8 2006-03-31 17:54:24 cg Exp $'
 ! !