Example #1
0
File: parse.c Project: xtao/c
static int
define(Map *scope[], char *k, void *v)
{
	Map *m;
	
	m = scope[nscopes - 1];
	if(mapget(m, k))
		return 0;
	mapset(m, k, v);
	return 1; 
}
Example #2
0
 std::set<T> oper(const std::set<T>& xs, const T& y) const {
  return mapset([&y](const T& x) -> T {return oper(x,y); }, xs);
 }
Example #3
0
 std::set<T> oper(const T& x, const std::set<T>& ys) const {
  return mapset([&x](const T& y) -> T {return oper(x,y); }, ys);
 }