Handbook
Glossary
cow-or-bull ( n g -- arr )
Vocabulary
rosetta-code
.
bulls-and-cows
Inputs
n
an
object
g
an
object
Outputs
arr
an
object
Definition
USING:
assocs
combinators
kernel
sequences
;
IN:
rosetta-code.bulls-and-cows
::
cow-or-bull
( n g -- arr )
{
{
[
n
first
g
at
n
second
=
]
[
<bull>
]
}
{
[
n
second
g
value?
]
[
<cow>
]
}
[
f
]
}
cond
;