chris613
2020-3-9 15:21:10

thanks a ton @mbutterick testing out the implications of lower arity checks was my next move


chris613
2020-3-9 15:24:16

@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 ?


hazemalhalabi
2020-3-9 20:20:45

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?


samth
2020-3-10 01:30:58

compose in Typed Racket only supports two arguments.


samth
2020-3-10 01:31:36

Using inst won’t help with that, you just have to use compose multiple times to compose more functions


hazemalhalabi
2020-3-10 02:50:58

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