I'm continuing with define/contract a bit. Let's say there are two definitions like this<br><br>#lang racket<br><br>(define/contract (sum/c lon)<br> ((listof number?) . -> . number?)<br> (sum lon))<br><br>(define (sum lon)<br>
(if (empty? lon)<br> 0<br> (+ (first lon) <br> (sum (rest lon)))))<br><br>> (has-contract? sum/c)<br>#t<br>> (has-contract? sum)<br>#f<br><br>Is there a way to get to what is protected by the contract? I can figure out that the procedure sum/c is protected by a contract with has-contract? but I would like to get the wrapped procedure (unprotected sum/c) out in that case. Perhaps that would be suitable for identity purposes? Or let's say the blame object in case the procedure is to blame?<br>
<br>I couldn't find anything from the documentation about this.<br><br>-Markku<br>