[Media] I implemented a type-level Fibonacci function with a while loop. 🦀 no nightly, no const generics/fn.

111 points saqulium 18 comments
[Media] I implemented a type-level Fibonacci function with a while loop. 🦀 no nightly, no const generics/fn.

Code (gist): https://gist.github.com/aluqas/c7209b8990762db72620a87200f3e2aa
Article in Japanese: https://zenn.dev/saqula/articles/2361ce8de47570

All in stable Rust. Associated constants in traits are used only for debugging and tests.


I tried to write a proper explanation in English, but... Rustc fried my brain.
I might write it up properly at some point, if I recover.🦀