function mysum(a::Array{Int32, 1})::Int32
    local i::Int32
    local r::Int32
    r = 0
    for i ∈ 1:length(a)
        r = r + a[i]
    end
    return r
end

function main()
    local i::Int32
    local s::Int32
    local x::Array{Int32, 1}
    for i ∈ 1:length(x)
        x[i] = i
    end
    s = mysum(Int32(x))
    println(s)
    if s ≠ 55
        println(Base.stderr, "ERROR STOP")
        exit(1)
    end
end

main()
