Thu Apr 18
Numbers
2 / 2 = 1.0
? Division seems to coerce to floatsdiv()
returns the divisor or 2, not 2.5. It's an integerrem()
returns the remainder or 1, not 0.5. The .5 is dividing the remainder by 2.(2 * 2.0) = 4.0
as the types coerce the resultFloat.round(1.2) === round(1.2) == false
Individual digits builds an array, not count of digits.
Integer.parse
returns the unparsable part as a string ".2"
Float.ciel
seems to round > 0 up to the next integer, even 0.25
Tuples
List.delete_at
is zero-based or more importantly pretty much all these methods are zero based to match array indexesKeyword Lists koan.
foo:
like json but the tuple reads :foo
{:foo , "bar"}
Needs the space after :foo