Permalink
Browse files

Format solve for increased readability

  • Loading branch information...
1 parent 97eff83 commit 15f82e9136211359337b8696b9e05e4bac262869 @norm2782 norm2782 committed May 30, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Language/Prolog/NanoProlog/NanoProlog.hs
View
3 src/Language/Prolog/NanoProlog/NanoProlog.hs
@@ -104,7 +104,8 @@ solve :: [Rule] -> Maybe Env -> [TaggedTerm] -> Result
solve _ Nothing _ = ApplyRules []
solve _ (Just e) [] = Done e
solve rules e ((tg,t):ts) = ApplyRules
- [ (tg, rule, solve rules (unify (t, c) e) ( (map (( tg ++). ('.' :). show) [1..]) `zip` cs ++ ts))
+ [ let cts = map ((tg ++) . ('.' :) . show) ([1..] :: [Int]) `zip` cs ++ ts
+ in (tg, rule, solve rules (unify (t, c) e) cts)
| rule@(c :<-: cs) <- tag tg rules
]

0 comments on commit 15f82e9

Please sign in to comment.