oops, in my haste to use 'map', i forgot about the k param... ..but this works: from __future__ import nested_scopes def additem(k,L): def _additem(x): if type(x) is type([]) : return map (_additem,x) else : return x+k return _additem(L)