# So You Want to be a Functional Programmer (Part 3)

## Function Composition

`var add10 = function(value) {    return value + 10;};var mult5 = function(value) {    return value * 5;};`
`var add10 = value => value + 10;var mult5 = value => value * 5;`
`var mult5AfterAdd10 = value => 5 * (value + 10)`
`var mult5AfterAdd10 = value => mult5(add10(value));`
`add10 value =    value + 10mult5 value =    value * 5mult5AfterAdd10 value =    (mult5 << add10) value`
`f x =   (g << h << s << r << t) x`

## Point-Free Notation

`-- This is a function that expects 1 parametermult5AfterAdd10 value =    (mult5 << add10) value`
`-- This is also a function that expects 1 parametermult5AfterAdd10 =    (mult5 << add10)`

`add x y =    x + ymult5 value =    value * 5`
`-- This is wrong !!!!mult5AfterAdd10 =    (mult5 << add) 10 `
`var mult5AfterAdd10 = mult5(add(10)); // this doesn't work`
`var mult5AfterAdd10 = y => mult5(add(10, y)); // not point-free`

--

--

## More from Charles Scalfani

Software Engineer and Architect, Teacher, Writer, Filmmaker, Photographer, Artist…

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