/// Calculate the `n`th number in the fibonacci sequence recursively.fn fibonacci(n: u32) -> u128 { match n { 0 => 0, 1 => 1, // We start from F₂ here to skip some tiny steps. Meaning that both the // previous and current values would be a 1. _ => fibonacci_impl(n - 2, 1, 1), }}
/// Inner tail recursive implementation function.fn fibonacci_impl(n: u32, prev: u128, current: u128) -> u128 { if n == 0 { current } else { fibonacci_impl(n - 1, current, prev + current) }}
We can also mark up inline code without syntax highlighting cron
and with syntax highlighting u64{:rust}
.
I want to be able to put things between spoilers and content warnings depending on the situation to actually be considerate of the reader. For example inline spoilers
There is also miscelaneous items, like the styling of horizontal rulers:
That have to be consistent with the site.