3 ms·
Using the type system to implement a Natural Numbers Object[1] is pretty clever. Doing math with it is not exactly efficient, but it does prove it works. [1] h
by DoomHotel 5y ago
Using the type system to implement a Natural Numbers Object[1] is pretty clever. Doing math with it is not exactly efficient, but it does prove it works.
[1] https://en.wikipedia.org/wiki/Natural_numbers_object https://en.wikipedia.org/wiki/Natural_numbers_object