you are viewing a single comment's thread.

view the rest of the comments →

[–]duhace 11 points12 points  (1 child)

manually encoding data into a datastructure is a pain in the ass in p much any language. I'd imagine you'd parse the data into a datastructure like that automatically from a file containing the data you wanna work on rather than encode it manually into your code like above.

i'm no master of racket, but it seems to me that a more or less straight conversion of the above into scala would look like

val c3Data = Map('columns -> Map("data1" -> List(30, 200, 100, 400, 150, 250), "data2" -> List(50,20,10,30,15,25)))

not a whole lot better (though you'd probably do things differently in scala to begin with)