this class takes map of type [string , list[string]] , outputs map of [string, string] key name of list , values binary representation of letters. each digit corresponds if letter appears in list or not. 1 - appears, 0 - not appear. example list : 1 = 1,1,0,0 2 = 1,1,1,0 3 = 1,1,0,1 4 = 1,1,0,0 returns 4-->1100 1-->1100 2-->1110 3-->1101 below iterative solution : object binaryrep { var userdetails : scala.collection.immutable.hashmap[string, list[string]] = new scala.collection.immutable.hashmap[string, list[string]] var letterstocheck = list("a" , "b" , "c" ,"d") def main(args: array[string]) { userdetails += "1" -> list("a" , "b") userdetails += "2" -> list("a" , "b" , "c") userdetails += "3" -> list("a" , "b" , "d") userdetails += "4" -> list("a" , ...