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-compiler-and-rts
compiler
Commits
30beb7cd
Commit
30beb7cd
authored
Oct 26, 2000
by
Martin Wierich
Browse files
added new macro "unsafeFold2St"
parent
e466a8dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/utilities.dcl
View file @
30beb7cd
...
...
@@ -89,6 +89,14 @@ where
fold_st2
xs
[]
st
=
abort
(
"fold_st2: first argument list contains more elements"
)
unsafeFold2St
op
l1
l2
st
:==
ufold_st2
l1
l2
st
where
ufold_st2
[
x
:
xs
]
[
y
:
ys
]
st
=
op
x
y
(
ufold_st2
xs
ys
st
)
ufold_st2
_
_
st
=
st
// foldSt :: !(.a -> .(.st -> .st)) ![.a] !.st -> .st
foldSt
op
l
st
:==
fold_st
l
st
...
...
frontend/utilities.icl
View file @
30beb7cd
...
...
@@ -175,6 +175,14 @@ where
fold_st2
xs
[]
st
=
abort
(
"fold_st2: first argument list contains more elements"
)
unsafeFold2St
op
l1
l2
st
:==
ufold_st2
l1
l2
st
where
ufold_st2
[
x
:
xs
]
[
y
:
ys
]
st
=
op
x
y
(
ufold_st2
xs
ys
st
)
ufold_st2
_
_
st
=
st
// foldSt :: !(.a -> .(.st -> .st)) ![.a] !.st -> .st
foldSt
op
r
l
:==
fold_st
r
l
where
...
...
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