summaryrefslogtreecommitdiff
path: root/Library/WriteProof.hs
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-03-12 02:17:25 +1100
committerJed Barber <jjbarber@y7mail.com>2014-03-12 02:17:25 +1100
commitb5ff89d417c73d74a42a1756cb3ecd99b7a3e7f4 (patch)
tree97bf2d3ad4e5eac7aec320b932ccf09fdf127871 /Library/WriteProof.hs
parentef81889c1eccb08acc27d47c9df652541134e3db (diff)
Removed some superfluous lambdas in intermediate functions
Diffstat (limited to 'Library/WriteProof.hs')
-rw-r--r--Library/WriteProof.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Library/WriteProof.hs b/Library/WriteProof.hs
index c7e0a5f..2c15b74 100644
--- a/Library/WriteProof.hs
+++ b/Library/WriteProof.hs
@@ -148,8 +148,8 @@ next :: Int -> PGraph -> [String]
next num graph =
let nodeList = filter (isNumber . snd) (Graph.labNodes graph)
numList = nub . (map (read . snd)) $ nodeList
- f = (\x y -> if (x `elem` y) then f (x + 1) y else x)
- g = (\x y -> if (x == 0) then y else g (x - 1) (f 0 (y ++ numList) : y))
+ f x y = if (x `elem` y) then f (x + 1) y else x
+ g x y = if (x == 0) then y else g (x - 1) (f 0 (y ++ numList) : y)
in map show (g num [])
@@ -177,10 +177,10 @@ writeGraph :: PGraph -> Node -> [String]
writeGraph graph node =
let label = fromJust (Graph.lab graph node)
argList = [1 .. (Graph.outdeg graph node)]
- f = (\s a -> let arg = getArg graph node a
- in if (isNothing arg)
- then s
- else (writeGraph graph (fromJust arg)) ++ s)
+ f s a = let arg = getArg graph node a
+ in if (isNothing arg)
+ then s
+ else (writeGraph graph (fromJust arg)) ++ s
in foldl' f [label] argList
@@ -195,9 +195,9 @@ writeAll :: PGraph -> [Node] -> [String]
writeAll graph nodeList =
let ordered = orderNodes graph nodeList
resolved = resolve graph ordered
- f = (\g n -> if (n == [])
- then []
- else (writeGraph g (head n)) ++ (f g (tail n)))
+ f g n = if (n == [])
+ then []
+ else (writeGraph g (head n)) ++ (f g (tail n))
in f resolved ordered