Step 3

		
			function yCombinator(recFunc) {
				function recursion(func) {
					return func(func)
				}
				
				function pseudo(func) {
					return recFunc((...arg) => {
						return func(func)(...arg)
					})
				}
				
				return recursion(pseudo)
			}
		
	

Now that these two children functions have been built, we can wrap them up and write our return statement for the Y-Combinator.

All that is left to be done with these two functions is to begin pseudo's recursive calls with the aptly named recursion function and the Y-Combinator is off to the races. This will allow the function to begin building up the function on the stack is it is called, allowing us to imitate recursion nearly exactly from an architectural standpoint. As should be clear however, the Y-Combinator is a higher-order function in both regards, it obviously accepts a function, but it returns one as well, this allows us to never have to pass the recursive functions arguments to the Y-Combinator.