Anonymous user
List comprehensions: Difference between revisions
no edit summary
(Pyhton: TODO for generators) |
No edit summary |
||
Line 25:
TODO: Alternative with generators
=={{header|Erlang}}==
pythag(N) ->
[ {A,B,C} ||
A <- lists:seq(1,N),
B <- lists:seq(1,N),
C <- lists:seq(1,N),
A+B+C =< N,
A*A+B*B == C*C
].
|