Re:Who Needs Haskell? Straight to Rust Hell
by spoiler on Saturday January 07, 2023 @12:27PM
(#34290304)
That's not quite the same (functionally) as the Rust solution though? Unless you meant to just illustrate a minimal PoC, in that case I suppose it does the job. More importantly (IMO) Rust allows us to be truly generic without sacrificing any type safety in the process.
Even in C, you could do something like in this godbolt link (ugly, I know):
https://godbolt.org/z/aKTz6fdbc