/// <summary> /// Example of a higher order function /// </summary> public static FinalGameScore MapScore(FSharpFunc<int, int> f, FinalGameScore game) { return new FinalGameScore(game.Game, f.Invoke(game.FinalScore)); }
/// <summary> /// Change the score for an existing game /// </summary> public static FinalGameScore ChangeScore(int newScore, FinalGameScore game) { return new FinalGameScore(game.Game, newScore); }