[racket] reading a file in student languages

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Oct 20 13:26:18 EDT 2010

Yesterday, Adam Shaw wrote:
> Hi --
> Could someone tell me how to read in a data file in Int. Student or Adv.
> Student?
> I'd like something like
> (define dict (read "/path/to/dict"))
> and bind dict to a list of strings.

This works:

  (with-input-from-file "/path/to/dict" read)

but you're probably better off writing plain racket code and letting
students use it as a teachpack.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.