16 lines
637 B
Text
16 lines
637 B
Text
:?py { Initialize the accumulating result list. }
|
|
& ( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { This is the subject }
|
|
: ? { Here starts the pattern }
|
|
%@?x
|
|
?
|
|
%@?y
|
|
?
|
|
%@?z
|
|
( ?
|
|
& -1*!z^2+!x^2+!y^2:0
|
|
& (!x,!y,!z) !py:?py
|
|
& ~ { This 'failure' expression forces backtracking }
|
|
) { Here ends the pattern }
|
|
| out$!py { You get here when backtracking has
|
|
exhausted all combinations of x, y and z }
|
|
);
|