The diagram below illustrates how the Y-Combinator works:
The following are the steps to wire up the Y-Combinator:
- f(newData) calls Base64ToByes with the base64 encoded text. dString is downcast into a string.
- The return func(e error) (Data, error) { statement is executed and returns execution back to the return statement in the Next function.
- At that time, f(newData), which itself is a function, has its newError parameter populated and can now be executed.
- Runtime execution returns to the return func(e error) (Data, error) line in Base64ToBytes and enters its code block, which is the return statement that ...