Skip to content

Instantly share code, notes, and snippets.

View xavierforge's full-sized avatar
🐼
Rock & Rolling

Chih Ying Yen xavierforge

🐼
Rock & Rolling
View GitHub Profile
@xavierforge
xavierforge / potter_kata.rs
Last active April 25, 2026 12:24
A Rust implementation of the Potter Kata, driven by TDD and Emergent Design principles.
#[derive(Default)]
pub struct ShoppingCart {
counts: [usize; 5],
}
impl ShoppingCart {
const BASE_PRICE: f64 = 100.0;
pub fn new() -> Self {
Self { counts: [0; 5] }