--- 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 $'
! !