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
cf79df7a
Commit
cf79df7a
authored
Aug 12, 2019
by
johnvg@science.ru.nl
Browse files
add RECORD instance of gMap
parent
2ee170a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Libraries/GenLib/GenMap.dcl
View file @
cf79df7a
...
...
@@ -3,6 +3,6 @@ definition module GenMap
import
StdGeneric
generic
gMap
a
b
::
.
a
->
.
b
derive
gMap
c
,
UNIT
,
PAIR
,
EITHER
,
CONS
,
FIELD
,
OBJECT
,
{},
{!}
derive
gMap
c
,
UNIT
,
PAIR
,
EITHER
,
CONS
,
RECORD
,
FIELD
,
OBJECT
,
{},
{!}
derive
gMap
[],
(,),
(,,),
(,,,),
(,,,,),
(,,,,,),
(,,,,,,),
(,,,,,,,)
Libraries/GenLib/GenMap.icl
View file @
cf79df7a
...
...
@@ -10,10 +10,10 @@ gMap{|PAIR|} fx fy (PAIR x y) = PAIR (fx x) (fy y)
gMap
{|
EITHER
|}
fl
fr
(
LEFT
x
)
=
LEFT
(
fl
x
)
gMap
{|
EITHER
|}
fl
fr
(
RIGHT
x
)
=
RIGHT
(
fr
x
)
gMap
{|
CONS
|}
f
(
CONS
x
)
=
CONS
(
f
x
)
gMap
{|
RECORD
|}
f
(
RECORD
x
)
=
RECORD
(
f
x
)
gMap
{|
FIELD
|}
f
(
FIELD
x
)
=
FIELD
(
f
x
)
gMap
{|
OBJECT
|}
f
(
OBJECT
x
)
=
OBJECT
(
f
x
)
gMap
{|{}|}
f
xs
=
mapArray
f
xs
gMap
{|{!}|}
f
xs
=
mapArray
f
xs
derive
gMap
[],
(,),
(,,),
(,,,),
(,,,,),
(,,,,,),
(,,,,,,),
(,,,,,,,)
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