Handbook
Glossary
square-anagram ( word1 word2 num1 num2 -- n/f )
Vocabulary
project-euler
.
098
Inputs
word1
an
object
word2
an
object
num1
an
object
num2
an
object
Outputs
n/f
an
object
Definition
USING:
assocs
combinators.short-circuit
kernel
math.order
math.parser
;
IN:
project-euler.098
::
square-anagram
( word1 word2 num1 num2 -- n/f )
{
[
num1 num2 word2
zip
substitute
word1
=
]
[
num2 num1 word1
zip
substitute
word2
=
]
[
word1 word2 num2
zip
substitute
num1
=
]
[
word2 word1 num1
zip
substitute
num2
=
]
}
0&&
[
num1 num2
[
string>number
]
bi@
max
]
[
f
]
if
;