Handbook
Glossary
complement-color ( color1 color2 -- color3 )
Vocabulary
benchmark
.
chameneos-redux
Inputs
color1
an
object
color2
an
object
Outputs
color3
an
object
Definition
USING:
arrays
combinators
kernel
;
IN:
benchmark.chameneos-redux
:
complement-color
( color1 color2 -- color3 )
2dup
=
[
drop
]
[
2array
{
{
{
red
yellow
}
[
blue
]
}
{
{
red
blue
}
[
yellow
]
}
{
{
yellow
red
}
[
blue
]
}
{
{
yellow
blue
}
[
red
]
}
{
{
blue
red
}
[
yellow
]
}
{
{
blue
yellow
}
[
red
]
}
[
bad-color-pair
]
}
case
]
if
;