<div dir="ltr"><div>Consider this file:</div><div><br></div><div>--------------------------------------------</div><div><div>#lang racket</div><div>(define/contract (twice x)</div><div>  (-&gt; number? number?)</div><div>  (* 2 x))</div>

<div><br></div><div>(twice &#39;foo)</div></div><div>--------------------------------------------</div><div><br></div><div>When run in DrRacket 5.3.6 this yields the following error:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">

<div><div>twice: contract violation</div></div><div><div> expected: number?</div></div><div><div> given: &#39;foo</div></div><div><div> in: the 1st argument of</div></div><div><div>      (-&gt; number? number?)</div></div>

<div><div> contract from: (function twice)</div></div><div><div> blaming: .../blame-test.rkt</div></div><div><div> at: .../blame-test.rkt: 2.18</div></div></blockquote><div><br></div><div>The final line attributes blame to the twice function (line 2, col 18), but clearly the blame in this instance lies with the client code (line 6), consistent with the first six lines of the error message.</div>

<div><br></div><div>Is this the intended behaviour?</div><div><br></div><div><br></div><div>Many thanks</div><div><br></div><div>Dan</div></div>