What is the correct way to represent 2D Vectors in Haskell?
I see some options: you can use a list, you can use a vector, you can use
tuples, you can use a custom datatype with a x and a y field, etc. In most
languages, one way is preferred against another for some specific reasons.
For example, in C++, it is much more performant to use a class.
Which is considered the linguistic way to do it in Haskell?
No comments:
Post a Comment