Follow up on Ben's idea:
Take n as an optional argument, init value #f.
On first application of f on the first values, continue n-map with
n=received number of values. Once arrived at the empty lists you know how
many values you should have.
At each iteration, you can even check that the number of values doesn't
change (or take the max?).

The only corner case is when provided with empty lists from the start, in
which case either the user can specify the init value for n if it is known,
or you can throw an exception.


On Sat, Mar 28, 2020, 00:40 Ben Greenman <benjaminlgreen...@gmail.com>
wrote:

> procedure-result-arity is very limited
>
> if you can find a way to call `f` once, though, you could assume that
> its result arity never changes
>
> --
> 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/CAFUu9R6YDx9%2BF27dHW3N1P%3DMK_UuzfrWqo01kigM4fBKxxFXUA%40mail.gmail.com
> .
>

-- 
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/CABNTSaEPkeTeMOS_wv9t774mVcBAbE5pqa4aaRfdvRXkCqRDCA%40mail.gmail.com.

Reply via email to