Re:Mindset Shifts for Functional Programming
by actionfromafar on Wednesday April 05, 2023 @09:06AM
(#35453473)
It's heretic and beside the point, but:
I can't help but think in terms of classic CPU.
[ Parent
| on HN ]
Re:Mindset Shifts for Functional Programming
by Joker_vD on Wednesday April 05, 2023 @10:19AM
(#35454678)
fun odd (n: Uint32) -> Bool =
let Uint32(n0, _, _, _) = n in
let Byte(b0, _, _, _, _, _, _, _) = n0 in
b0
Who needs hardware support for integers anyway? If you want a two-complement arithmetic, you can build it yourself (although presumably it'll be in the standard library).