countdown-numbers-game 0.0 → 0.0.0.1
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~optparse-applicative
Dependency ranges changed: optparse-applicative
Files
- countdown-numbers-game.cabal +2/−2
- test/Test/Utility.hs +4/−4
countdown-numbers-game.cabal view
@@ -1,5 +1,5 @@ Name: countdown-numbers-game-Version: 0.0+Version: 0.0.0.1 Synopsis: Solve problems from the number round of the Countdown game show Description: Solver for the numbers round of the Countdown game show:@@ -38,7 +38,7 @@ Makefile Source-Repository this- Tag: 0.0+ Tag: 0.0.0.1 Type: darcs Location: https://hub.darcs.net/thielema/countdown-numbers-game
test/Test/Utility.hs view
@@ -85,7 +85,7 @@ (Solve.Sum posA negA, Solve.Sum posB negB) -> Solve.SubExpr $ Solve.Sum- (mergyLeftByNE (<) posA negB) + (mergeLeftByNE (<) posA negB) (ListHT.mergeBy (<) negA $ NonEmpty.flatten posB) sumFromSubExpr :: Solve.SubExpr Solve.Sum -> Solve.Sum@@ -121,7 +121,7 @@ Solve.SubExpr $ singletonSum $ Solve.SubExpr $ Solve.Product- (mergyLeftByNE (<) normA recB)+ (mergeLeftByNE (<) normA recB) (ListHT.mergeBy (<) recA $ NonEmpty.flatten normB) productFromSubExpr :: Solve.SubExpr Solve.Sum -> Solve.Product@@ -145,9 +145,9 @@ then NonEmpty.Cons x $ ListHT.mergeBy lt xs (y:ys) else NonEmpty.Cons y $ ListHT.mergeBy lt (x:xs) ys -mergyLeftByNE ::+mergeLeftByNE :: (a -> a -> Bool) -> NonEmpty.T [] a -> [a] -> NonEmpty.T [] a-mergyLeftByNE lt xt@(NonEmpty.Cons x xs) yt =+mergeLeftByNE lt xt@(NonEmpty.Cons x xs) yt = case yt of [] -> xt y:ys ->