A Rust library that provides a flexible way to construct and extend the recursive function.
I think it's a good idea to have a attribute macro, which, for example, expands ```rust #[recur_fn] fn fact(n: u64) -> u64 { if n == 0 { 1 } else { n * fact(n - 1) } }; ``` to ```rust struct Fact {} impl RecurFn<u64, u64> for Fact { #[inline] fn body(&self, fact: impl Fn(u64) -> u64, n: u64) -> u64 { if n == 0 { 1 } else { n * fact(n - 1) } } } static FACT: Fact = Fact {}; fn fact(n: u64) -> u64 { FACT.call(n) } ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by Jason5Lee and has received 0 comments.