[plt-scheme] Contract Error Message

From: YC (yinso.chen at gmail.com)
Date: Mon Jul 20 16:02:34 EDT 2009

On Mon, Jul 20, 2009 at 12:46 PM, Carl Eastlund <carl.eastlund at gmail.com>wrote:

> No, or/c is not a higher order contract.  It is a higher order
> function that produces a (possibly higher-order) contract.
> A higher order contract is one that wraps a function and delays
> contract checking to function application time.  For instance,
> (string? integer? . -> . string?) is a contract one could give to
> substring.  It can't check the inputs and outputs right away (as there
> are none inherent in the function), so it "wraps" the function.  It
> checks the inputs on each entry to the function and the outputs on
> each exit.  If the input or output contracts are themselves
> higher-order, those values are similarly "wrapped".

Thanks for the correction - I guess or/c should be called a composite
contract then?  I followed the reasoning that a higher order function is a
function that takes other functions as parameters and hence a higher order
contract is one that takes other contracts.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090720/788fa2a8/attachment.html>

Posted on the users mailing list.