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
cduce
cduce
Commits
75058a68
Commit
75058a68
authored
Jun 26, 2014
by
Julien Lopez
Browse files
[TESTS][MINOR] Fix in mapf from stdlib/list
parent
0acf2a7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/libtest/tallyingTest.ml
View file @
75058a68
...
...
@@ -16,7 +16,7 @@ module ESet = OUnitDiff.SetMake (struct
if
(
v1
,
t1
)
==
(
v2
,
t2
)
then
0
else
let
c
=
Var
.
compare
v1
v2
in
if
c
<>
0
then
c
else
Types
.
compare
(
diff
t1
a
)
(
diff
t2
a
)
let
pp_printer
ppf
(
v
,
t
)
=
Format
.
fprintf
ppf
"(%a = %a)"
Var
.
p
rint
v
Types
.
Print
.
pp_type
t
let
pp_printer
ppf
(
v
,
t
)
=
Format
.
fprintf
ppf
"(%a = %a)"
Var
.
p
p
v
Types
.
Print
.
pp_type
t
let
pp_print_sep
=
OUnitDiff
.
pp_comma_separator
end
)
...
...
tests/stdlib/list/list.cd
View file @
75058a68
...
...
@@ -38,7 +38,7 @@ let iteri (f : (Int -> 'a -> []))(l : [('a)*]) : [] =
let mapf (f : 'a -> 'b)(l : [('a)*]) : [('b)*] =
let aux (f : 'a -> 'b)(l : [('a)*])(acc : [('b)*]) : [('b)*] = match l with
| [] -> acc
| [el; rest] -> aux f rest (acc @ [el]) in
| [el; rest] -> aux f rest (acc @ [
(f
el
)
]) in
aux f l []
(* List scanning *)
Write
Preview
Markdown
is supported
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