Index: src/examples/array.c
===================================================================
--- src/examples/array.c	(revision 0638c4478ec4ff0f8f60a487e62a73c0cf2fad06)
+++ src/examples/array.c	(revision a1d6d80c1ef8e65ed06f390d2aed4fac6d418b6e)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// array.c -- 
+// array.c --
 //
 // Author           : Richard C. Bilson
 // Created On       : Wed May 27 17:56:53 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 18:13:52 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Apr 27 17:21:52 2016
 // Update Count     : 3
 //
@@ -26,5 +26,5 @@
 // The first element is always at index 0.
 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
-elt_type * begin( array_type array ) {
+elt_type * begin( array_type * array ) {
 	return &array[ 0 ];
 }
@@ -32,5 +32,5 @@
 // The end iterator should point one past the last element.
 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
-elt_type * end( array_type array ) {
+elt_type * end( array_type * array ) {
 	return &array[ last( array ) ] + 1;
 }
Index: src/examples/array.h
===================================================================
--- src/examples/array.h	(revision 0638c4478ec4ff0f8f60a487e62a73c0cf2fad06)
+++ src/examples/array.h	(revision a1d6d80c1ef8e65ed06f390d2aed4fac6d418b6e)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// array.h -- 
+// array.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Wed May 27 17:56:53 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 18:13:35 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Apr 27 17:26:04 2016
 // Update Count     : 5
 //
@@ -26,6 +26,6 @@
 
 // A bounded array is an array that carries its maximum index with it.
-trait bounded_array( otype array_type, otype elt_type | array( array_type, elt_type ) ) {
-	int last( array_type );
+trait bounded_array( otype array_type, otype elt_type | array( array_type *, elt_type ) ) {
+	int last( array_type * );
 };
 
@@ -41,8 +41,9 @@
 // return iterators corresponding to the first element and the one-past-the-end element, STL-style.
 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
-elt_type *begin( array_type );
+elt_type * begin( array_type * array );
 
+// The end iterator should point one past the last element.
 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
-elt_type *end( array_type );
+elt_type * end( array_type * array );
 
 #endif // ARRAY_H
Index: src/examples/vector_int.c
===================================================================
--- src/examples/vector_int.c	(revision 0638c4478ec4ff0f8f60a487e62a73c0cf2fad06)
+++ src/examples/vector_int.c	(revision a1d6d80c1ef8e65ed06f390d2aed4fac6d418b6e)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// vector_int.c -- 
+// vector_int.c --
 //
 // Author           : Richard C. Bilson
 // Created On       : Wed May 27 17:56:53 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed May 27 18:38:05 2015
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Apr 27 17:27:12 2016
 // Update Count     : 3
 //
@@ -22,18 +22,25 @@
 #define DEFAULT_CAPACITY 20
 
-vector_int vector_int_allocate() {
-	return vector_int_allocate( DEFAULT_CAPACITY );
+void ?{}( vector_int * vec ) {
+	vec { DEFAULT_CAPACITY };
 }
 
-vector_int vector_int_allocate( int reserve ) {
-	vector_int new_vector;
-	new_vector.last = -1;
-	new_vector.capacity = reserve;
-	new_vector.data = malloc( sizeof( int ) * reserve );
-	return new_vector;
+void ?{}( vector_int * vec, int reserve ) {
+	vec->last = -1;
+	vec->capacity = reserve;
+	vec->data = malloc( sizeof( int ) * reserve );
 }
 
-void vector_int_deallocate( vector_int vec ) {
-	free( vec.data );
+void ?{}( vector_int * vec, vector_int other ) {
+	vec->last = other.last;
+	vec->capacity = other.capacity;
+	vec->data = malloc( sizeof( int ) * other.capacity );
+	for (int i = 0; i < vec->last; i++) {
+		vec->data[i] = other.data[i];
+	}
+}
+
+void ^?{}( vector_int * vec ) {
+	free( vec->data );
 }
 
@@ -56,10 +63,10 @@
 // implement bounded_array
 
-lvalue int ?[?]( vector_int vec, int index ) {
-	return vec.data[ index ];
+lvalue int ?[?]( vector_int * vec, int index ) {
+	return vec->data[ index ];
 }
 
-int last( vector_int vec ) {
-	return vec.last;
+int last( vector_int * vec ) {
+	return vec->last;
 }
 
Index: src/examples/vector_int.h
===================================================================
--- src/examples/vector_int.h	(revision 0638c4478ec4ff0f8f60a487e62a73c0cf2fad06)
+++ src/examples/vector_int.h	(revision a1d6d80c1ef8e65ed06f390d2aed4fac6d418b6e)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// vector_int.h -- 
+// vector_int.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Wed May 27 17:56:53 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed May 27 18:39:05 2015
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Apr 27 17:26:59 2016
 // Update Count     : 2
 //
@@ -25,7 +25,8 @@
 } vector_int;
 
-vector_int vector_int_allocate();						// allocate vector with default capacity
-vector_int vector_int_allocate( int reserve );			// allocate vector with specified capacity
-void vector_int_deallocate( vector_int );				// deallocate vector's storage
+void ?{}( vector_int * );								// allocate vector with default capacity
+void ?{}( vector_int *, int reserve );          // allocate vector with specified capacity
+void ?{}( vector_int * vec, vector_int other ); // copy constructor
+void ^?{}( vector_int * );								// deallocate vector's storage
 
 void reserve( vector_int *vec, int reserve );			// reserve more capacity
@@ -34,6 +35,6 @@
 // implement bounded_array
 
-lvalue int ?[?]( vector_int vec, int index );			// access to arbitrary element (does not resize)
-int last( vector_int vec );								// return last element
+lvalue int ?[?]( vector_int * vec, int index );			// access to arbitrary element (does not resize)
+int last( vector_int * vec );								// return last element
 
 #endif // VECTOR_INT_H
Index: src/examples/vector_test.c
===================================================================
--- src/examples/vector_test.c	(revision 0638c4478ec4ff0f8f60a487e62a73c0cf2fad06)
+++ src/examples/vector_test.c	(revision a1d6d80c1ef8e65ed06f390d2aed4fac6d418b6e)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// vector_test.c -- 
+// vector_test.c --
 //
 // Author           : Richard C. Bilson
 // Created On       : Wed May 27 17:56:53 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 17 12:23:55 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Apr 27 17:31:27 2016
 // Update Count     : 18
 //
@@ -20,5 +20,5 @@
 
 int main( void ) {
-	vector_int vec = vector_int_allocate();
+	vector_int vec;
 
 	// read in numbers until EOF or error
@@ -34,9 +34,9 @@
 
 	sout | "Array elements:" | endl;
-	write( begin( vec ), end( vec ), sout );
+	write( begin( &vec ), end( &vec ), sout );
 	sout | endl;
 
 	sout | "Array elements reversed:" | endl;
-	write_reverse( begin( vec ), end( vec ), sout );
+	write_reverse( begin( &vec ), end( &vec ), sout );
 	sout | endl;
 }
