I have been implementing some toy problems in typed/racket. However,
I have hit a wall while trying to invoke `(random-sample)`. This
(define (example (limit : Integer)
(count : Integer))
: (Listof Integer)
(let* ((random-sample-inst (inst random-sample Integer)))
(random-sample-inst (in-range -10 limit)
(example 10 5)
gives the error message:
Type Checker: No function domains matched in function application:
; Types: (Sequenceof Integer) Integer Pseudo-Random-Generator #f * ->
; (Sequenceof Integer) Integer #f * -> (Listof Integer)
; Arguments: (Sequenceof Integer) Integer #f *
; Expected result: (Listof Integer)
; in: (random-sample-inst (in-range -10 limit) count #:replacement #f)
Maybe I'm missing something obvious, but it seems like the types of
the supplied arguments are an exact match for the types of the second
candidate domain printed in the error message.
Any ideas on how to invoke this function from typed/racket?
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
For more options, visit https://groups.google.com/d/optout.