class Main {
    static void main(args) {

        def bit1, bit2, bit3, bit4, carry

        def fourBitAdder = new FourBitAdder(
                { value -> bit1 = value },
                { value -> bit2 = value },
                { value -> bit3 = value },
                { value -> bit4 = value },
                { value -> carry = value }
        )