On Mon, Jul 20, 2009 at 12:46 PM, Carl Eastlund <span dir="ltr"><<a href="mailto:carl.eastlund@gmail.com">carl.eastlund@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br></div>No, or/c is not a higher order contract. It is a higher order<br>
function that produces a (possibly higher-order) contract.<br>
<br>
A higher order contract is one that wraps a function and delays<br>
contract checking to function application time. For instance,<br>
(string? integer? . -> . string?) is a contract one could give to<br>
substring. It can't check the inputs and outputs right away (as there<br>
are none inherent in the function), so it "wraps" the function. It<br>
checks the inputs on each entry to the function and the outputs on<br>
each exit. If the input or output contracts are themselves<br>
higher-order, those values are similarly "wrapped".</blockquote><div> </div><div>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.<br>
<br></div></div>Cheers,<br>yc<br><br>