How to code the following pseudo-code elegantly in Haskell?
for (i from 0 to 100):
for (j from 0 to 100):
k=0
while ( f(i,j,k) >0 ):
return (i,j,k)
k+=1
where f is an unimportant function of i,jand k.
So it should output something like this: [(0,0,0),(0,0,1)..], a list with each element a tuple formed by i,jandk. (It's fine if it were of the form [[0,0,0],[0,0,1]...] instead of tuples.)