-- Autogenerated with DRAKON Editor 1.32

function createBar(left, right)
    local x, y
    -- item 388
    x = left + 10
    y = right + 20
    -- item 380
    return {
        left = x,
        right = y
    }
end

function doSomething(first, second, third)
    local bar, fifth, fourth, i, moo, x37
    -- item 369
    fourth = first + second
    fifth = second + 10
    third = third or ""
    -- item 372
    x37 = fourth -
    	fifth * 2
    -- item 371
    moo = {
        x = 10 + math.cos(first),
        y = 20
    }
    -- item 374
    third.z = 30
    -- item 370
    bar = createBar(
        first,
        444
    )
    -- item 373
    print(
        fourth,
        fifth,
        x37,
        moo,
        bar
    )
    -- item 3980001
    i = 0
    while true do
        -- item 3980002
        if i < 2 then
            
        else
            break
        end
        -- item 400
        print(i)
        -- item 3980003
        i = i+1
    end
end

function lambdas()
    local lam, lam2, lam3, p, someVar
    -- item 419
    someVar = 900
    -- item 412
    lam = function(left, right) 
        print(
            left,
            right,
            someVar
        )
    end
    -- item 413
    lam(45, 46)
    -- item 414
    lam2 = function(value) 
        return value * 2
    end
    -- item 415
    print(
        lam2(10)
    )
    -- item 416
    lam3 = function() 
        return {
            x = 22,
            y = 33
        }
    end
    -- item 417
    p = lam3()
    print(p)
end

function main()
    -- item 310
    print("hello")
    -- item 386
    doSomething(
        100,
        2000,
        {x=60000}
    )
    -- item 418
    lambdas()
    -- item 387
    print("bye")
end


main()

--Символы Юникод
