Functions of a Higher Order

function add(a, b){
return a + b
|
' Could be rewritten into thisfunction curryAdd(a){
return function(b){
return a + b
}
}
const addFunc = curryAdd(1)addFunc(2) //3
addFunc(3) //4
addFunc(5) //6
...
const numberAdder = num1 => num2 => num3 => num1 + num2 + num3
const deleteClick = id => () =>{   dispatch(deleteProject({id}))}<Btn onClick={deleteClick(id)} value={"Delete"}/>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store