[plt-scheme] Problems reading contracts

From: geb a (geb_a at yahoo.com)
Date: Sat Aug 23 14:14:33 EDT 2008

I am having trouble understanding the new documentation using contracts.  I would like to overwrite a file that exists but I'm doing something improperly.

my code:
(with-output-to-file "foo.txt" (lambda() (write x)) 'truncate)

The documentation says that
mode-flag : (one-of/c 'binary 'text) = 'binary
                (one-of/c 'error 'append 'update 'replace 'truncate 'truncate/replace)

I've tried many different combinations of flags but have not been able to land on the right one.  Would someone explain the above notation to me so that I will be able to read the documenation a bit better?

Thanks so much for your time.




Posted on the users mailing list.