small medium large xlarge

06 Jan 2014, 15:35
Federico Tomassetti (5 posts)

Hi, reading the book I wonder how could I represent random access structures (I am thinking about a bidimensional matrix but the same apply to vectors). Lists are good for sequential access but terrible for the rest. Maybe I could use dicts (am I not restricted to keywords for keys, anyway?) but it does not feel right for large chuncks of data

07 Jan 2014, 05:08
Dave Thomas (344 posts)

If the size is fixed, you could use tuples or tuples, so a 2x2 matrix could be

{ {1, 2}, {3, 4}}

Otherwise, I suspect you’ll be struggling.


29 Jan 2014, 22:53
Federico Tomassetti (5 posts)

Well, i am thinking abou a world map, reasonably a 512x512 matrix. So it would be really important to have random acess. Maybe this is not the best scenario for something like Elixir, which gives its best a stream data processing

  You must be logged in to comment