garnet/rust/puzzle.rs
George Thomas 437c2f290d Use strings for output types in Rust
This is a compromise that gets us most of the way towards what we have with the heterogeneous list in Haskell, but without any complex abstractions.
2025-12-16 17:38:53 +00:00

6 lines
143 B
Rust

pub struct Puzzle<Input, const N: usize> {
pub number: u32,
pub parser: fn(&str) -> Input,
pub parts: [fn(&Input) -> String; N],
}