You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can think of two ways to do checks.
The more general way: make sure that applyRules calls Result.map and Result.andThen
The more specific way: make sure that all of oneStonePerPointRule captureRule libertyRule koRule and changePlayer are called with Result.* instead of in the pattern matching.
The second way is motivated by my own experience of using changePlayer in the pattern matching at the end in my first draft. Since the instructions say it should only be done if all passes, it made sense. Of course, using in with Result.map is a lot more clever, so maybe other students could be lead to this solution.
Or maybe a mix of both? Check in general and only a special one for changePlayer.
The text was updated successfully, but these errors were encountered:
Source.
I can think of two ways to do checks.
The more general way: make sure that
applyRules
callsResult.map
andResult.andThen
The more specific way: make sure that all of
oneStonePerPointRule captureRule libertyRule koRule
andchangePlayer
are called withResult.*
instead of in the pattern matching.The second way is motivated by my own experience of using
changePlayer
in the pattern matching at the end in my first draft. Since the instructions say it should only be done if all passes, it made sense. Of course, using in withResult.map
is a lot more clever, so maybe other students could be lead to this solution.Or maybe a mix of both? Check in general and only a special one for
changePlayer
.The text was updated successfully, but these errors were encountered: