package Ġio . github . fb iv ille . solver Ċ Ċ import Ġio . github . fb iv ille . solver . Named Functions . no Op ĊĊ Ċ sealed Ġclass ĠSolution Ċ Ċ object ĠNo Solution Ġ: ĠSolution () Ċ Ċ data Ġclass ĠSolution Branch ( val Ġmoves : ĠList < Move >) Ġ: ĠSolution () Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġinitial Move ( start Value : ĠNumber ) Ġ= ĠMove ( Success ( start Value , ĠNamed Function (" INIT ", Ġ{ it } ))) ĊĊĠĠĠĠĠĠĠ Ġfun Ġapply ( operation : ĠNamed Function , Ġvalue : ĠComp utation ) Ġ= ĠMove ( value . map ( operation )) ĊĊĠĠĠĠĠĠĠ Ġfun Ġno Op ( value : ĠNumber ) Ġ= ĠMove ( Success ( value , Ġno Op ())) ĊĠĠĠ Ġ} Ċ } Ċ Ċ data Ġclass ĠValid ated Solution ( val Ġmoves : ĠList < Successful Move >): ĠSolution () Ċ Ċ data Ġclass ĠMove ( val Ġresult : ĠComp utation ) Ċ Ċ data Ġclass ĠSuccessful Move ( val Ġresult : ĠSuccess )