Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FactorialSelfApply = YRecurse(newFactorialFunc)
Functions ¶
func FactorialCall ¶
func FactorialFunc ¶
Factorial is a function that computes the factorial of n using the Y combinator
func IterFactorial ¶
func StructFactorial ¶
func StructFactorialInt64 ¶
Types ¶
type FnInt64 ¶
FnInt64 is a specific type of recursive function that implements some data logic and decides when to recursively call itself. However, it does not have a direct reference to itself but must use a function pointer from a closure or variable.
func YRecurse ¶
func YRecurse(newFunc YFuncGenerator) FnInt64
YRecurse create a new function for every iteration and then calls this function.
type YFuncGenerator ¶
YFuncGenerator is a function that takes a FnInt64 function returns a function to call the given FnInt64 recursively.
Click to show internal directories.
Click to hide internal directories.