Commit 42b56be9 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-09-07 08:17:07 by simonmar]

Fix some signatures after the change to the Ix class.
parent 83fe3380
......@@ -199,7 +199,7 @@ mapAccumL f s (b:bs) = (c:cs,s'')
-- Here is a version of @elem@ that uses partual application
-- to optimise lookup.
arrElem :: (Ix a) => [a] -> a -> Bool
arrElem :: (Ord a, Ix a) => [a] -> a -> Bool
arrElem obj = \x -> inRange size x && arr ! x
where
size = (maximum obj,minimum obj)
......@@ -209,7 +209,7 @@ arrElem obj = \x -> inRange size x && arr ! x
-- again using arrays, of course. Remember @b@ can be a function !
-- Note again the use of partiual application.
arrCond :: (Ix a)
arrCond :: (Eq a, Ix a)
=> (a,a) -- the bounds
-> [(Assoc [a] b)] -- the simple lookups
-> [(Assoc (a -> Bool) b)] -- the functional lookups
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment