Skip to content

Instantly share code, notes, and snippets.

View billvanyo-zz's full-sized avatar

Bill Vanyo billvanyo-zz

  • Lake Ariel, PA
View GitHub Profile
@billvanyo-zz
billvanyo-zz / YCombinator.java
Created March 28, 2019 19:30
Demo of recursive factorial function using anonymous lambda expressions and a "Y combinator".
/*
A demonstration of recursive implementation of the factorial function using anonymous
lambda expressions and a "Y combinator".
see: https://en.wikipedia.org/wiki/Fixed-point_combinator
*/
import java.math.BigInteger;
public class YCombinator {