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"}/>

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Generating multi-brand multi-platform icons with Sketch and a Node.js script

How to Convert React Class Components to Functional Components with React Hooks

How to deploy a Nestjs/Postgres server to Heroku

Specify jdk version on bash

The New JAVACRIPT 2022 is HERE! 5 Features that will blow your mind 🤯

Promises in Javascript

TOAST UI Doc: A Tool That Will AWESOMEIFY Your JavaScript API Documentation

CRUD in Angular

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
Nate Nelson

Nate Nelson

More from Medium

Thailand’s Advance To The Future

Technology as a means to improve the impact of post-secondary instructional practice.

Processing Medical Records

What is Application Maintenance?