1 import Base 2 import ./ordinary_app_observation_data.bend as DTO 3 type Recipe World & DTO.Observation> is Type: 4 Recipe{} 5 def observation_right(~World:Type,~L:Data,~R:Data,left:L,leftText:List<&2,String>,result:World & DTO.Observation) -> World & DTO.Observation>: 6 match result: 7 case (world,DTO.Observation{right,rightText}):(world,DTO.Observation{DTO.Product{left,right},List.append(&2,String,leftText,rightText)}) 8 def observation_left(~World:Type,~L:Data,~R:Data,~right:World -> World & DTO.Observation,result:World & DTO.Observation) -> World & DTO.Observation>: 9 match result: 10 case (world,DTO.Observation{value,text}):observation_right(~World,~L,~R,value,text,right(world)) 11 def observe_pair(~World:Type,~L:Data,~R:Data,~left:World -> World & DTO.Observation,~right:World -> World & DTO.Observation,world:World) -> World & DTO.Observation>: 12 observation_left(~World,~L,~R,~right,left(world))