How do i read the following file which has columns of data with header and space or tab delimited, in Haskell 98.
How can i access each element in the input file for example if this 4 by 7 matrix, accessing [1][2] gives YR.
Also how to get the difference in dates in Haskell 98
ID YR MO DA YrM MoM DaM
100 2010 2 20 2010 8 30
110 2010 4 30 2010 9 12
112 2010 8 20 2010 10 20
This is a short demo using
readFile,(!!),map,words, andlines:It’s probably not exactly what you want, but should get you on the right track. Keep in mind that this is implementing your solution using lists rather than an array.
Forgot to mention, stick your matrix data into a file named test.txt.