
proc struct { name slots } {
    set nslots [llength $slots]
    for { set i 0 } { $i<$nslots } { incr i } {
	eval proc "$name-[lindex $slots $i]" object \{ \
            return \[lindex \$object $i\] \
            \}
    }
}
