3 ms·
Implementing the comparisons by hand seems difficult and primitive. May I suggest introducing some helpful sub-packages and building the solution on top of thos
by jrpelkonen 3y ago
Implementing the comparisons by hand seems difficult and primitive. May I suggest introducing some helpful sub-packages and building the solution on top of those. For instance, is-odd would be implemented by using is-one, is-three, is-five, is-seven, etc.
- leeoniya 3y agoand is-one should be implemented by negating is-two, is-three, and so forth
- paddy_m 3y agoI read some text where a cheme was implemented such that numbers were `2 = 1+1`, `3 = 2+ 1`...
- jcparkyn 3y agoProbably Peano numbers. https://wiki.haskell.org/Peano_numbers https://wiki.haskell.org/Peano_numbers
- jbboehr 3y agoPerhaps Nock: https://developers.urbit.org/reference/nock/definition https://developers.urbit.org/reference/nock/definition > The reader might wonder how an interpreter whose only arithmetic operation is increment can ever be practical. > The short answer is that a Nock interpreter doesn't have to use the algorithm above. It just has to get the same result as the algorithm above.