Your curious example suggests you might be solving a more specialized problem, like selecting the diagonal of a flattened matrix. In this case, there are much better (and more efficient) data structures that enforce invariants (like squareness of a matrix), if that is what you in fact are doing.

Taral wrote:
On 11/30/06, Huazhi (Hank) Gong <[EMAIL PROTECTED]> wrote:
Thanks, it make sense here.
However, like I want to choose s[1,3,6,10] or something like this. Are there
some straightforward function or operator for doing this job? The !!
operator in haskell seems does not support multiple indecies.

If you're trying to do random access on a list, you should rethink why
you're using a list.



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to