[Haskell-cafe] How to convert records into Haskell structure in
Haskell way?
Magicloud Magiclouds
magicloud.magiclouds at gmail.com
Mon Nov 2 20:29:56 EST 2009
Hi,
Say I have something like this:
[ Record { item = "A1", value = "0" }
, Record { item = "B1", value = "13" }
, Record { item = "A2", value = "2" }
, Record { item = "B2", value = "10" } ]
How to convert it into:
[ XXInfo { name = "A", value1 = "0", value2 = "2" }
, XXInfo { name = "B", value1 = "13", value2 = "10" } ]
If XXInfo has a lot of members. And sometimes the original data
might be not integrity.
--
竹密岂妨流水过
山高哪阻野云飞
More information about the Haskell-Cafe
mailing list