js: partial application example