How match elements from two lists in scala? -
I have two lists according to the following list-
val a = list ( HarddiskVolume1, 31,1), (C :, 46552070, 433057), (E, 5435,1728), (_Total, 46557536,434786)) Value B = List (C, E :) I want the output as following: o / p (c:, 46552070, 433057), (E, 5435,1728)
How do I get the desired output using Scala ??
val an = list (("harddiskvolume1", 31,1), ("c ("C:", "E:") a.filter (x = "46"), ("E:", "E:", 54351728), ("_Total", 46557536,434786) & Gt; b in (x._1)) / / If b is large, consider making it a set. // res0: list [(string, int, int) = list ((c:, 46552070, 433057), (E, 5435,1728))
Comments
Post a Comment