[racket] how to write a contract for indeterminate number of return values

From: Matthew Butterick (mb at mbtype.com)
Date: Thu Dec 18 14:02:07 EST 2014

"If (values range-expr ...) is used as the last sub-form of ->, the function must produce a result for each contract, and each value must match its respective contract." [1]

I understand what this means if you have a fixed number of return values. But how do you write an output contract for an indeterminate number of return values? 

Similar to how (listof type?) contract doesn't care how long the list is, I'm trying to write a contract that means "however many values come back, they all need to be integers".

[1] http://docs.racket-lang.org/reference/function-contracts.html

Posted on the users mailing list.