class List( int value; List next; );

void buildListText( List a; var []char result; ) {
   []char result1;
	if ( a != null ) {
		if ( a.next == null )
			result = "" + a.value;
		else {
			buildListText( a.next, result1 );
			result = a.value + ", " + result1;
			}
		}
	}

List a5 = new List{ 5, null };
List a3 = new List{ 3, a5 };
List a1 = new List{ 1, a3 };
List a = a1;
[]char result;
buildListText( a, result );
println( "{" + result + "}" );
