Comment

Comment by kooi

Coming from Rust:

Why is does implementation still have a the generic T? Should it not be concrete on i32?

/// i32 forms a sum reducer under 0 and addition const sum_trait = impl(Reducer(i32), struct { pub const empty = 0; pub fn combine(x: T, y: T) T { return x + y; } });

parent kooi 8 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton