package Ġcollections . max _ min Ċ Ċ import Ġcollections .* Ċ Ċ fun ĠShop . get Customer With Maximum NumberOf Orders (): ĠCustomer ? Ġ= ĊĠĠĠ Ġ/* < task Window > */ customers . max By Ġ{ Ġit . orders . size Ġ} /* </ task Window > */ Ċ Ċ fun ĠCustomer . get Most Ex pensive Ordered Product (): ĠProduct ? Ġ= ĊĠĠĠ Ġ/* < task Window > */ orders . flatMap Ġ{ Ġit . products Ġ}. max By Ġ{ Ġit . price Ġ} /* </ task Window > */ Ċ