hoshom
2021-1-10 18:57:05
How do I make a contract for something like apply
? The part I’m interested in is that eg. for (define (apply proc args) ...)
I
hoshom
2021-1-10 18:57:31
would like to have a contract that says args should be a list of as many values as proc takes as arguments
ben.knoble
2021-1-10 19:01:40
I think you need ->i
to express the dependence
hoshom
2021-1-10 19:04:11
yes but how do I figure out the number of arguments a procedure accepts? Or rather, that it at least accepts as many as “args”, since it could support more due to rest-args
ben.knoble
2021-1-10 19:06:57
procedure-arity
might help
hoshom
2021-1-10 19:16:11
oh, thanks!