I wish I could see how to make a better error message for this input,
but I'm not seeing it. Do you?

Robby

On Tue, Nov 1, 2016 at 11:50 AM, David Storrs <david.sto...@gmail.com> wrote:
> Aha.  It's always the simple things that get you.  Thanks, Alexis.
>
> On Tue, Nov 1, 2016 at 12:30 PM, Alexis King <lexi.lam...@gmail.com> wrote:
>>
>> You have the order wrong for ->*. The #:rest option should come
>> after the positional argument contracts, just before the return
>> contract. Since this function has no positional optional arguments,
>> you can either omit the optional positional argument contracts
>> entirely:
>>
>>     (->* () #:rest (listof procedure?) any)
>>
>> …or you can include it, before #:rest:
>>
>>     (->* () () #:rest (listof procedure?) any)
>>
>> > On Nov 1, 2016, at 9:18 AM, David Storrs <david.sto...@gmail.com> wrote:
>> >
>> > What would the correct contract for this function be?
>> >
>> > (define/contract (register-functions . func-list)
>> >    (->* () #:rest (listof procedure?) () any)  ;; this is wrong
>> >
>> >    (for ((f func-list)) ...do something...))
>> >
>> >
>> > I've read through the docs below and it doesn't make clear how to do it.
>> >
>> > https://docs.racket-lang.org/guide/contracts-general-functions.html
>> > https://docs.racket-lang.org/reference/function-contracts.html
>>
>> --
>> 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.
>> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to