thanks a ton @mbutterick testing out the implications of lower arity checks was my next move
@mbutterick so an efficient way to prune the search space of say all recipes beginning with A would be to have a single arity constraint as my first constraint ? that way anything that fails the first constraint reduces the search space for 2 arity & 3 arity constraints etc ?
I’m trying to compose functions in Typed Racket but I get an error saying only 2 args are expected: #lang typed/racket
(compose add1 add1 add1 add1 add1)
_
Type Checker: Polymorphic function `compose' could not be applied to arguments:
Wrong number of arguments - Expected 2, but got 5
I might be mistaken but it seems I should be using inst
for this but I’m struggling to figure out how to use it in this case. Any ideas?
compose in Typed Racket only supports two arguments.
Using inst won’t help with that, you just have to use compose multiple times to compose more functions
ah I see. I got confused because compose supports multiple args in #lang racket
This is probably a dumb question: how do I find the function signature of the Typed Racket versions of regular Racket functions? I tried searching the docs for L:typed/racket compose
but got nothing. The only result for compose
is from racket/base, racket
and the docs don’t show the Typed Racket arg limit