Back <a href="http://reddit.com/info?id=1x70" rel="nofollow">at reddit</a>, i've found this Haskell one liner:
[(x,y,x) | x <- [2..9], y <- [2..9], z <- [2..9], x^2 + y^2 == z^2]
Beautiful (but then, see <a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi/Practices/Kata">what katas are about</a>).
↧