Hi Kevin,

Take a look at Racket Guide’s Argument and Result Dependencies
<https://docs.racket-lang.org/guide/contracts-general-functions.html#%28part._contracts-arrow-d%29>
and/or Racket Reference’s ->i
<https://docs.racket-lang.org/reference/function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3ei%29%29>
.

In contrast to The Racket Reference which is technical and more difficult
to navigate, Racket Guide is very easy to navigate and explains stuff
really well. Reading the table of contents is usually enough to point you
to the section that you want.

On Thu, Jul 18, 2019 at 1:48 PM Kevin Forchione <lyss...@gmail.com> wrote:

> Hi guys,
> This is a little tricky to explain, so I’ll give a small example:
>
> [define/contract [foo x) (-> integer? not-x/c) body …)
>
> In this case the not-x/c is what I’m asking about. Some way that the
> contract can refer to a previous argument value? Ordinarily this would be a
> predicate, but the parameters don’t appear to be in the scope of the
> contract. so ((λ (v) (not (= v x))) won’t work here, but it gets at the
> issue I”m interested in. I could of course interrogate the arguments inside
> the body of the function, but was wondering if a contract could do so.
>
> Kevin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/33F99A77-8609-4C37-AF59-E407A38A066A%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CADcuegtPeTpVFVsDfNv5MX%2BpsH4rjjqLJ3s%2B-v9gC6jdxxuHDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to