Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There already must be a arity check at some point, no? If the type contained the set of airties the lambda accepts rather than just the singe one, all the same type checking could be done when it's already done.


There's no type checking on function dispatch unless guards are explicitly added. The arity dispatch for functions captured into first class is done at compile time and require explicitness. That said, I think you can create your own dispatch macro that's probably as efficient as possible for doing what you proposed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: