We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useful for defining recursive functions via lambda syntax.
The text was updated successfully, but these errors were encountered:
Here is what I have in mind:
static <A> A fix(F<A, A> f, F<F0<A>, A> delay) { return new Object() { final A a = delay.f(() -> f.f(this.a)); }.a; }
static <A, B> F<A, B> rec(F<F<A, B>, F<A, B>> f, F<F0<B>, B> delay) { return new F<A, B>() { final F<A, B> rec = f.f(this); @Override public B f(A a) { return delay.f(() -> rec.f(a)); } }; }
Does that make sense?
Sorry, something went wrong.
No branches or pull requests
useful for defining recursive functions via lambda syntax.
The text was updated successfully, but these errors were encountered: