Skip to content

Instantly share code, notes, and snippets.

View collardeau's full-sized avatar
🏠
Working from home

Thomas Collardeau collardeau

🏠
Working from home
View GitHub Profile
const pipe = require("ramda").pipe; // node or webpack/browserify
const firstInitial = pipe(getFirstName, getFirstLetter);
@collardeau
collardeau / func.js
Last active October 23, 2015 19:20
func-js-01
const getFirstName = person => person.split(" ")[1]; // second word
const getFirstLetter = string => string[0]; // first letter
const getFirstInitial = person => {
return getFirstLetter(getFirstName(person)); // nested function!
}
// try it
getFirstInitial("Doc Emmett Brown"); // "E"