This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Ansi 6 Color" : { | |
"Green Component" : 0.5133699178695679, | |
"Blue Component" : 0.5209967494010925, | |
"Red Component" : 0.4681892693042755 | |
}, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chainedAddition = a => b => console.log(a+b) | |
const chainedAddition = (a) => { | |
return (b) => { | |
console.log(a+b) | |
} | |
} | |
var chainedAddition = function chainedAddition (a) { | |
return function (b) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const enhancer = addCurried(1) | |
// addCurried(1) returns a function in the form of | |
// b => console.log(a+b) with a = 1 | |
// which is stored in variable enhancer | |
enhancer(2) | |
// Execute enhancer with b = 2, result is 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const add = (a, b) => console.log(a + b) | |
add(1, 2) // Result is 3 | |
const addCurried = a => b => console.log(a + b) | |
addCurried(1)(2) // Result is also 3 | |
const anotherAddCurried = a => b => c => console.log(a + b + c) |