type Node {
    value: i32,
    next: usize,
}

pub fn main(world: World) -> Void raises {
    let first: Node = Node { value: 10, next: 1 }
    let second: Node = Node { value: 20, next: 2 }
    let third: Node = Node { value: 12, next: 99 }
    var index: usize = 0
    var total: i32 = 0
    while index != 99 {
        if index == 0 {
            total = total + first.value
            index = first.next
        } else if index == 1 {
            total = total + second.value
            index = second.next
        } else {
            total = total + third.value
            index = third.next
        }
    }
    if total == 42 {
        check world.out.write("list element definition ok\n")
    }
}
