equal
  deleted
  inserted
  replaced
  
    
    
     9 type Path = List[Pos]    // a path...a list of positions  | 
     9 type Path = List[Pos]    // a path...a list of positions  | 
    10   | 
    10   | 
    11   | 
    11   | 
    12 //(2a) Implement a first-function that finds the first   | 
    12 //(2a) Implement a first-function that finds the first   | 
    13 //     element, say x, in the list xs where f is not None.   | 
    13 //     element, say x, in the list xs where f is not None.   | 
    14 //     In that case return f(x), otherwise None. If possible,  | 
    14 //     In that case Return f(x), otherwise None. If possible,  | 
    15 //     calculate f(x) only once.  | 
    15 //     calculate f(x) only once.  | 
    16   | 
    16   | 
    17 //def first(xs: List[Pos], f: Pos => Option[Path]) : Option[Path] = ...  | 
    17 //def first(xs: List[Pos], f: Pos => Option[Path]) : Option[Path] = ...  | 
    18   | 
    18   | 
    19 //(2b) Implement a function that uses the first-function for  | 
    19 //(2b) Implement a function that uses the first-function for  |