Index: src/libcfa/iostream
===================================================================
--- src/libcfa/iostream	(revision 0ec92299f0bd3358cab9ec5e092ffa1fb4c73302)
+++ src/libcfa/iostream	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul  7 08:35:59 2017
-// Update Count     : 118
+// Last Modified On : Wed Aug  9 16:42:47 2017
+// Update Count     : 131
 //
 
@@ -46,6 +46,10 @@
 }; // ostream
 
-trait writeable( otype T ) {
-	forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
+// trait writeable( otype T ) {
+// 	forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
+// }; // writeable
+
+trait writeable( otype T, dtype ostype | ostream( ostype ) ) {
+	ostype * ?|?( ostype *, T );
 }; // writeable
 
@@ -77,5 +81,6 @@
 
 // tuples
-forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } ) ostype * ?|?( ostype * os, T arg, Params rest );
+forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype * ?|?( ostype *, Params ); } )
+ostype * ?|?( ostype * os, T arg, Params rest );
 
 // manipulators
@@ -90,9 +95,9 @@
 
 // writes the range [begin, end) to the given stream
-forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
-void write( iterator_type begin, iterator_type end, os_type *os );
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write( iterator_type begin, iterator_type end, ostype * os );
 
-forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
-void write_reverse( iterator_type begin, iterator_type end, os_type *os );
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write_reverse( iterator_type begin, iterator_type end, ostype * os );
 
 //---------------------------------------
Index: src/libcfa/iostream.c
===================================================================
--- src/libcfa/iostream.c	(revision 0ec92299f0bd3358cab9ec5e092ffa1fb4c73302)
+++ src/libcfa/iostream.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Jul 16 21:12:03 2017
-// Update Count     : 398
+// Last Modified On : Wed Aug  9 16:46:51 2017
+// Update Count     : 401
 //
 
@@ -193,5 +193,5 @@
 
 // tuples
-forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } )
+forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype * ?|?( ostype *, Params ); } )
 ostype * ?|?( ostype * os, T arg, Params rest ) {
 	os | arg;											// print first argument
@@ -256,13 +256,13 @@
 //---------------------------------------
 
-forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
-void write( iteratortype begin, iteratortype end, ostype * os ) {
-	void print( elttype i ) { os | i; }
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write( iterator_type begin, iterator_type end, ostype * os ) {
+	void print( elt_type i ) { os | i; }
 	for_each( begin, end, print );
 } // ?|?
 
-forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
-void write_reverse( iteratortype begin, iteratortype end, ostype * os ) {
-	void print( elttype i ) { os | i; }
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write_reverse( iterator_type begin, iterator_type end, ostype * os ) {
+	void print( elt_type i ) { os | i; }
 	for_each_reverse( begin, end, print );
 } // ?|?
Index: src/tests/.expect/div.txt
===================================================================
--- src/tests/.expect/div.txt	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ src/tests/.expect/div.txt	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,3 @@
+div 2, 3 2, 3 2, 3
+div 2, 3
+div 2, 3
Index: src/tests/div.c
===================================================================
--- src/tests/div.c	(revision 0ec92299f0bd3358cab9ec5e092ffa1fb4c73302)
+++ src/tests/div.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -11,6 +11,6 @@
 // Created On       : Tue Aug  8 16:28:43 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Aug  8 18:02:44 2017
-// Update Count     : 14
+// Last Modified On : Wed Aug  9 17:09:40 2017
+// Update Count     : 16
 // 
 
@@ -28,7 +28,5 @@
 	sout | "div" | div( s1, s2 ) | endl;
 	T t1 = { 13 }, t2 = { 5 };
-	[t1, t2] = div( t1, t2 );							// polymorphic div
-	sout | "div" | t1 | t2 | endl;
-//	sout | "div" | div( t1, t2 ) | endl;
+	sout | "div" | div( t1, t2 ) | endl;				// polymorphic div
 } // main
 
