[plt-scheme] A couple of contract questions
Woodhouse Gregory
gregory.woodhouse at gmail.com
Sat Aug 16 18:30:41 EDT 2008
How do I write a contract for a function that takes no arguments
(i.e., a thunk)?
Is it possible to write a contract specifying that the return value
is a function of particular shape? Ideally, I'd like to be able to
write something like
(-> integer? (-> integer? integer?))
for a function like
(lambda (x) (lambda (y) (+ x y)))
but I don't know if that's possible. (Instead, I've just used
procedure? for the range.)
"Mathematics is the science of patterns."
--Lynn Arthur Steen, 1988
http://www.gwoodhouse.com
http://GregWoodhouse.ImageKind.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080816/f0c91631/attachment.html
More information about the plt-scheme
mailing list