Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Frontull Samuel
alpha
Commits
55ebf977
Commit
55ebf977
authored
Jul 27, 2021
by
Frontull Samuel
Browse files
final touch
parent
7d5e947e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pcp/pcp.hs
pcp/pcp.hs
+3
-1
No files found.
pcp/pcp.hs
View file @
55ebf977
...
...
@@ -228,7 +228,9 @@ cross_cmb :: ListStrPairs -> ListStrPairs -> ListStrPairs
cross_cmb
=
ycomb
(
\
f
x
y
->
ite
(
is_nil
x
)
nil
(
append
(
map_cmb
(
hd_l
x
)
y
)
(
f
(
tl_l
x
)
y
)))
-- combine pairs and check if any pair with equal strings is created, otherwise iterate
-- combine lists of pairs of strings
-- and check if any pair with equal strings is created
-- if yes return true otherwise reiterate
pcp
::
ListStrPairs
->
LCBool
pcp
=
\
x
->
ycomb
(
\
f
x
y
->
ite
(
is_nil
x
)
false
(
ite
(
find_eq
x
)
true
(
f
(
cross_cmb
x
y
)
y
)))
x
x
...
...
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