examples/htdp/convert/convert.rkt
#lang planet wrturtle/pyret/bsl

# Fahrenheit to Celsius
fun convert(input, output):
  write_file(output, number_to_string( f2c( string_to_number( read_file( input )))))

fun f2c(f):
  5/9 * (f - 32)

convert("sample.dat", "out.dat")