Curryied functions in ATS

I said in the Intro-to-ATS book that curried functions are not commonly used
in ATS. When playing with dot-symbol overloading in ATS, I found a genuine
use of curried functions.

// print out “Hello!” 10 times
val () = (10).foreach()(lam(i) => println! “Hello!”)
// Compute 1 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10
val () = (10).foldleft(TYPE{int})(1, lam(res, i) => res * (i+1))

Please see the following SATS and DATS files for more information: