JavaScript method delegates with currying support