1. s,conn 2. traceroute 3. def filterMap(f,g,x): y = [] for xi in x: if f(xi): y.append(g(xi)) return y u = [5,-12,13,-8] filterMap(lambda x: x > 0,lambda x: 2*x,u) # [10,26] 4. def addIfNew(x,y): if not y in x: return x+y return x def uniq(w): return reduce(addIfNew,w) x = 'abcabdec' # char strings only print uniq(x) # 'abcde'