exercism / sml

Exercism exercises in Standard ML.
https://exercism.org/tracks/sml
MIT License
26 stars 33 forks source link

Planets are out of order in the datatype declaration for space-age #214

Closed dapritchard closed 1 year ago

dapritchard commented 1 year ago

two-fer.sml has the following datatype declaration.

datatype planet = Mercury | Venus | Earth | Mars
                | Jupiter | Saturn | Neptune | Uranus

However, the Neptune and Uranus variants are out of order in terms of the ordering of the planets in distance from the sun, as well as the ordering in the corresponding instructions.md from top to bottom of the page.

I was carelessly copy/pasting lines of code based on the order of planets in the datatype declaration and ended up with having the 'number of earth years' coefficients swapped for Neptune and Uranus which caused me a few minutes of confusion. I'm mentioning this here in the hopes of potentially saving the next person from the same mistake.

Many thanks for providing this fantastic resource!

rainij commented 1 year ago

@dapritchard thanks for reporting this. I will take care of this.