square-anagram ( word1 word2 num1 num2 -- n/f )


Vocabulary
project-euler.098

Inputs
word1an object
word2an object
num1an object
num2an object


Outputs
n/fan object


Definition


:: 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 ;