Re: [racket-users] define/contract for private functions

2019-07-23 Thread Bogdan Popa
> When I want to enable these private contracts (e.g. when running tests or > debugging a problem) I simply change the source code of `def/c` so that it > is wired up to `define/contract` and the contract is checked. Here is an > example: http://pasterack.org/pastes/4224 You can run arbitrary co

[racket-users] define/contract for private functions

2019-07-23 Thread Ryan Kramer
I've found myself wanting to write contracts on private functions, but I don't want to pay the performance cost during normal operation. What I've been doing is making a `def/c` macro which looks exactly like `define/contract` but is wired up to `define` and discards the contract. When I want t