Commit 66f2e595 authored by John van Groningen's avatar John van Groningen
Browse files

export strictness of removeIndex (because == is strict)

parent f5cc725f
......@@ -114,7 +114,7 @@ removeDup :: !.[a] -> .[a] | Eq a // Remove all duplicates from list
special a=Int
a=Char
a=Real
removeIndex :: a !u:[a] -> (Int,u:[a]) | Eq a // "removeMember" returning index of removed element
removeIndex :: !a !u:[a] -> (Int,u:[a]) | Eq a // "removeMember" returning index of removed element
special a=Int
a=Char
a=Real
......
......@@ -345,10 +345,10 @@ removeMembers::!u:[a] !.[a] -> u:[a] | Eq a
removeMembers x [] = x
removeMembers x [b:y] = removeMembers (removeMember b x) y
removeIndex :: a !u:[a] -> (Int,u:[a]) | Eq a
removeIndex :: !a !u:[a] -> (Int,u:[a]) | Eq a
removeIndex e xs = removei e xs 0
where
removei :: a u:[a] !Int -> (Int,u:[a]) | == a;
removei :: !a u:[a] !Int -> (Int,u:[a]) | == a;
removei e [x:xs] i
| x==e
= (i,xs)
......
Supports Markdown
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