Skip to content

Instantly share code, notes, and snippets.

View Rudxain's full-sized avatar

Ricardo Fernández Serrata Rudxain

View GitHub Profile
@Rudxain
Rudxain / over-engineered fizz-buzz.rs
Last active May 16, 2024 21:45 — forked from rust-play/playground.rs
My impl of fizz-buzz in purely type-safe Rust
use num_integer::Integer; // 0.1
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
enum S {
F,
B,
FB,
}
fn fb<T: Integer>(n: &T) -> Option<S> {