List deepSum := method( total := 0 self foreach(e, if(e type == "List") then( total = total + e deepSum ) else( total = total + e ) ) return total ) a := list(1,2,3) b := list(4,5,6) c := list(7,8,9) a deepSum println b deepSum println c deepSum println c := list(a,b,c) c deepSum println