Implementation of support for partial functions in JavaScript