On Wed, Sep 5, 2018 at 2:29 PM, Alexander McLin
wrote:
> Something like the following program:
>
> #lang racket
>
> (module foomod racket
> (provide foo)
> (define/contract (foo arg) (-> string? #t) #t))
>
> (require 'foomod)
> (provide (contract-out (foo (-> non-empty-string? #t
>
>
I wa
Something like the following program:
#lang racket
(module foomod racket
(provide foo)
(define/contract (foo arg) (-> string? #t) #t))
(require 'foomod)
(provide (contract-out (foo (-> non-empty-string? #t
On Tuesday, September 4, 2018 at 9:00:06 PM UTC-4, David K. Storrs wrote:
>
>
What about reproviding foo and using contract-out to wrap foo in a new
contract?
On Tuesday, September 4, 2018 at 9:00:06 PM UTC-4, David K. Storrs wrote:
>
>
>
> On Tue, Sep 4, 2018 at 8:55 PM, Matthew Butterick > wrote:
>
>>
>> On Sep 4, 2018, at 3:54 PM, David Storrs > > wrote:
>>
>> Say
On Tue, Sep 4, 2018 at 8:55 PM, Matthew Butterick wrote:
>
> On Sep 4, 2018, at 3:54 PM, David Storrs wrote:
>
> Say I have this (possibly from a third-party module):
>
> (define/contract (foo arg) (-> string? #t) #t)
>
> I want to ensure that the argument is always non-empty, so I tighten the
Say I have this (possibly from a third-party module):
(define/contract (foo arg) (-> string? #t) #t)
I want to ensure that the argument is always non-empty, so I tighten the
contract. I could do this:
(set! foo (contract (-> non-empty-string? #t) foo 'foo 'neg))
Mutating the function is pr
5 matches
Mail list logo