The type annotations are optional, so
fun square(n):
n * n
end
is a closer direct comparison to the Python program, for contexts that don't use annotations.