int num( []int a; ) { return a[ 0 ]; }; int den( []int a; ) { return a[ 1 ]; }; []int rational( int a, b; ) { []int result = new []int{ a, b }; return result; } void printRat( []int r; ) { println( num( r ) + "/" + den( r ) ); } real ratToReal( []int r; ) { return ( num( r ) + 0.0 ) / den( r ); } []int r = rational( 3, 2 ); printRat( r ); println( ratToReal( r ) );