|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
tdecacqu commented 4 years ago "if x then True else False" can be written as "x" when x evaluate as a Bool ;) validate x = mod ( sumDigits (doubleEveryOther (toDigits x))) 10 == 0 | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
tdecacqu commented 4 years ago "type x = y" actually just creates an alias for "y" named "x". Thus Peg is a String, and "a" is already a String. That means you can call (hanois 1 "a" "b" "c") directly. | ||
|
||
|
||
nicely done!