Phapang ke efe pakeng tsa Scala Future onComplete le andThen mesebetsi?
Ka bobeli `andThen` le `onComplete` li u lumella hore u shebe sephetho sa bokamoso bo itseng ka mosebetsi oa ho khutlisa. Leha ho le joalo, `andThen` e ka kenngoa ka ketane,'me ho fapana le `onComplete`, e tiisa tatellano eo mesebetsi ea ho letsetsa morao e tla sebelisoa ka eona. Ho phaella moo, callback e fuoeng `andThen` e ka 'na ea e-ba mosebetsi o sa fellang, o sebetsanang feela le karoloana ea liphello (mohlala, feela `Success` kapa feela `Failure`).  Nahana ka mohlala o latelang o sebelisang `andThen` le `map`:  ` ` ` ` defAndThen(fut: Future[Int]): Future[Int] = { fut.andThen { case Success ((value) => println ((s"andThen1: $value") } .andThen { case Success ((value) => println ((s"andThen2: $value") } . {map i => println ((s"map: $i") ea } } ` ` ` `  Ha `fut` e phethela ka katleho, "andthen1:...", "andThen2:..." le "map:..." li tla hatisoa ka tatellano eo.  Nahana ka mohlala o tšoanang o sebelisang `onComplete` le `map`:  ` ` ` ` defOnComplete(fut: Future[Int]): Future[Int] = { futonComplete { t: Leka[Int] => println{"s"onComplete1: $t") } futonComplete { t: Leka[Int] => println{"s"onComplete2: $t") } fut.map { i => println ((s"map: $i") ea } } ` ` ` `  Tabeng ena, ha `fut` e phethela ka katleho, "onComplete1:...", "onComplete2:..." le "map:..." li tla hatisoa ka tatellano e sa hlalosoang.  Le hoja `andThen` e tlamiloe ka ketane, mosebetsi oa ho khutlisa ha o ame ka kakaretso sephetho sa `Future` e hlahang. Empa hlokomela: haeba ho khutlisetsoa morao ho hlahisa liphoso tse itseng tse bolaeang, bokamoso bo hlahang bo ke ke ba phethoa.