Functional programmers tend to use recursion instead of explicit loops with implicit state, and it's wise to regard for loops with suspicion since it can't return anything.
Standard ML as the language of instruction is a vehicle for teaching FP semantics, not imperative ones.
Also, Tower of Hanoi is a classic problem that's well suited for recursion.
Standard ML as the language of instruction is a vehicle for teaching FP semantics, not imperative ones.
Also, Tower of Hanoi is a classic problem that's well suited for recursion.