An open API service indexing awesome lists of open source software.

https://github.com/inanitionnn/currying

Task for Red Duck Software
https://github.com/inanitionnn/currying

Last synced: 3 months ago
JSON representation

Task for Red Duck Software

Awesome Lists containing this project

README

        

# TwoTasks

Two easy tasks before you apply for an interview

1. Задача: не змінюючи логіки, змінити структуру коду, щоби вона відповідала принципу DRY:
ctx.prototype.**applyStyleState = function (styleState) {
var keys = Object.keys(styleState), i, key;
for (i=0; i a*b*c;
const add = (a,b,c,d,e) => a+b+c+d+e;

const curry = (f) => { /_ write your solution here _/ }

curry(add)(1)(2)(3)(4)(5) == add(1,2,3,4,5) // should be true
curry(multiply)(1)(2)(3) == multiply(1,2,3) // should be true

Гарного дня! :)