In trying to understand what is happening.
Joseph Beltramo
1

Sorry for the confusion. The code in the “Typical” section is completely separate and unrelated to the code in the “U Combinator” section.

I will remove that code for better clarity here:

// The U Combinator
const U = f => f(f)
// U Combinator function
const UsayHello = U(sayHello => () => 'hello')
UsayHello()
// > "hello"

I should have named the argument sayHello to differentiate it from the other code block. I hope this helps clear things up.

Currying is a little different. I wouldn’t call this currying. I have some examples of currying here you can see: https://hackernoon.com/the-beauty-in-partial-application-currying-and-function-composition-d885bdf0d574

Cheers!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.