Join or merge function in haskell -
is there function in haskell equivalent of sql join or r merge ?
basically have 2 list of tuples , 'zip' them according key. know there 1 or 0 value each key
a = [(1, "hello"), (2, "world")] b = [(3, "foo"), (1, "bar")]
and like
[ (just (1, "hello), (1, "bar)) , (just (2, "world), nothing) , (nothing , (3, "foo")) ]
i can not think of standard function doing operation. convert 2 lists data.map.map
s , code sql-join myself. in way, looks doable o(n log n) complexity, not bad.
Comments
Post a Comment