6 lines
133 B
Standard ML
6 lines
133 B
Standard ML
let pyth n =
|
|
let* x = 1 -- n in
|
|
let* y = x -- n in
|
|
let* z = y -- n in
|
|
if x * x + y * y <> z * z then [] else
|
|
[x, y, z]
|