dialect "objectdrawDialect" import "Scribble" as sc type Scribble = sc.Scribble def emptyScribble = sc.emptyScribble def scribble = sc.scribble type ScribbleCollection = { // newest element of scribble collection scribbleAt(pt: Point) -> Scribble // newest element of scribble collection first -> Scribble // rest of the scribbles in the collection rest -> ScribbleCollection } def emptyScribbleCollection: ScribbleCollection is public = object { method scribbleAt(pt: Point) -> Scribble { // ??? Given the type, what is the only choice? } method first -> Scribble { // ??? Given the type, what is the only choice? } method rest -> ScribbleCollection { // ??? Given the type, what is the only choice? } } class scribbleCollection.adding(first': Scribble) to (rest': ScribbleCollection) -> ScribbleCollection { // newest element of scribble collection method first -> Scribble { // ??? } // rest of the scribbles in the collection method rest -> ScribbleCollection { // ??? } // return the first scribble containing pt. If there aren't any, return emptyScribble method scribbleAt(pt: Point) -> Scribble { // ???? } }