Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
66f2e595
Commit
66f2e595
authored
Nov 23, 2006
by
John van Groningen
Browse files
export strictness of removeIndex (because == is strict)
parent
f5cc725f
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/StdEnv/StdList.dcl
View file @
66f2e595
...
...
@@ -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
...
...
libraries/StdEnv/StdList.icl
View file @
66f2e595
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment