list.map( doSomething);
4524
function getImageData(array, callback)
    {
    "use strict";    
    array.map( doSomething);   
    // this is not fully satisfying - I collect the promises and then do the writeFile via timeout
    setTimeout(function(){
        "use strict";  
        Q.all(promises)
            .then(function (first) {
                writeFile();
            }, function (error) {
            // All of the promises were rejected.
        });

    },0);

    }
1127455
function list(context, err, items, paths) {
    if (err) return fail(context, err);
    
    var long = context.options["l"];
    
    if (typeof long === "undefined") long = (context.command.slice(-3) === "dir");
    
    items.forEach(function (item) {
        if (item.filename == "." || item.filename == "..") return;
        
        if (paths) {
            shell.write(item.path);
        } else if (long) {
            shell.write(item.longname);
        } else {
            shell.write(item.filename);
        }
    });
    
    context.end();
}
228307
public void setList(long now, List<SimpleOrderedMap<Object>> list)
      throws IOException {
    if (action.equals(ComponentCollection.ACTION_LIST)) {
      this.now = now;
      this.list = list;
    } else {
      throw new IOException("not allowed with action '" + action + "'");
    }
  }
958188
def list():
    
    choice_len = max(map(len, _input_choices.keys()))
    tmpl = "  {:<%d}: {}\n" % choice_len
    text = ''.join(map(
        lambda k_v: tmpl.format(k_v[0], k_v[1][0]), six.iteritems(_input_choices)))
    click.echo(text)
552229
@Override
    public <B> ListT<W,B> map(final Function<? super T, ? extends B> f) {
        return of(run.map(o -> o.map(f)));
    }
1228266
function(list, delim) {
            return new Anonymous(!isArray(list.value)
                ? list.toCSS()
                : list.value.map(function(a) {
                    return toString(a, "", "");
                }).join(delim ? delim.value : ", "));
        }
1343028
def map_helper(data):
    
    as_list = []
    length = 2
    for field, value in data.items():
        as_list.append(Container(field=bytes(field, ENCODING),
                                 value=bytes(value, ENCODING)))
        length += len(field) + len(value) + 4
    return (Container(
        num=len(as_list),
        map=as_list
    ), length)
1101811
function ReachedList(hashFn) {
   var list = {};

   this.store = function(point, route) {
      list[hashFn(point)] = route;
      return;
   };

   this.find = function(point) {
      return list[hashFn(point)];
   };
   return this;
}
689081
def tag_map(self):
        '''  '''
        tm = dd(list)
        for tag in self.__tags:
            tm[tag.tagtype].append(tag)
        return tm
1104794
def ListGrrBinaries(context=None):
  """"""

  items = context.SendIteratorRequest("ListGrrBinaries", None)
  return utils.MapItemsIterator(
      lambda data: GrrBinary(data=data, context=context), items)
681923
function WordList(words) {
  this.words = words;
  this.map = Object.create(null);

  for (let i = 0; i < words.length; i++) {
    const word = words[i];
    this.map[word] = i;
  }
}
905019
def ListHuntApprovals(context=None):
  """"""
  items = context.SendIteratorRequest("ListHuntApprovals",
                                      hunt_pb2.ApiListHuntApprovalsArgs())

  def MapHuntApproval(data):
    return HuntApproval(data=data, username=context.username, context=context)

  return utils.MapItemsIterator(MapHuntApproval, items)
186694
private Map<String, ChatConversationBase> makeMapFromSavedConversations(List<ChatConversationBase> list) {

        Map<String, ChatConversationBase> map = new HashMap<>();

        if (list != null && !list.isEmpty()) {
            for (ChatConversationBase details : list) {
                map.put(details.getConversationId(), details);
            }
        }

        return map;
    }
648298
def map_column(self, keys, func):
        
        return [[func(v) for v in self[key]] for key in keys]
772568
def map(self, mapper: Callable[[Any], Any]) -> 'List':
        """"""
        try:
            ret = List.from_iterable([mapper(x) for x in self])
        except TypeError:
            ret = List.from_iterable([partial(mapper, x) for x in self])
        return ret
254550
function toRouteMap(routeList) {
	var routeMap = {};
	for (var i = 0, len = routeList.length; i < len; i++) {
		var route = routeList[i];
		routeMap[route['path']] = route;
	}
	return routeMap;
}
159
function list(scriptModule, agent, msg, cb) {
    const servers = [];
    const scripts = [];
    const idMap = agent.idMap;

    for (const sid in idMap) {
        if (idMap.hasOwnProperty(sid)) {
            servers.push(sid);
        }
    }

    fs.readdir(scriptModule.root, (err, filenames) => {
        if (err) {
            filenames = [];
        }
        for (let i = 0, l = filenames.length; i < l; i++) {
            scripts.push(filenames[i]);
        }

        cb(null, {
            servers: servers,
            scripts: scripts
        });
    });
}