Not that obscure - I was using it in my project just last week!
I had two different functions to run for attaching methods to objects - one for methods that took arguments, another for methods that didn't. The Function length property was very useful to create a convenience function to automatically pick the correct method adder.
It is also used in the commonly used function that will curry the passed function:
Not that obscure - I was using it in my project just last week!
I had two different functions to run for attaching methods to objects - one for methods that took arguments, another for methods that didn't. The Function
length
property was very useful to create a convenience function to automatically pick the correct method adder.It is also used in the commonly used function that will curry the passed function:
Oooh, genius! (And the project that you linked is super cool too!)