Elliot Suzdalnitski
1 min readJul 13, 2019

--

Nice quote! Unfortunately, this example has nothing to do with functional programming. You aren’t even using function composition. How about:

const filterByName = name =>
filter( x => x.name === name );
const applePrice =
fruits
|> Object.values
|> filterByName('apple')
|> head
|> get('price');

--

--

Responses (2)