Not a question: minor suggestion for documentation

The sections of the ATS Book on functions may want to have an additional
section on scope, for those of us not as familiar with scope in SML. Though
technically the effects are described in the let/in/end section before
functions are introduced, I wanted to double check some scope issues with
functions, e.g.:

#include
"share/atspre_staload_tmpdef.hats"
//
(* ****** ****** *)

staload “prelude/lmacrodef.sats”

staload “libc/SATS/stdio.sats”

fun
outer(a: int): int = let
//
val b = 10 // This is in scope for use in inner()
fun
inner(x: int, y: int, z: int): int = let
in // of [inner]
(x + y + z + b):int
end // of [inner]
//
val b = 10 // This is NOT in scope for use in inner()
val c = ~10000
in // of [outer]
(inner(a, b, c)):int
end // of [outer]

implement main0() =
{
val c = 100
val p = 1
val outnum = outer§
val () = println! (outnum)
}

This was a bit surprising to me at first, but, it does seem convenient for
e.g. loops functions.

This is only true in ATS2.

In ATS, the first declared b is not available in ‘inner’ unless 'inner’
is declared as follows:

fun
inner(x: int, y: int, z: int): int = let

I would like to introduce something similar to this in ATS2 as well.

OK, I thought it seemed suspiciously similar to my conception of a closure
:).