package modules.dataflow;

import utils.*;
import simulator.*;
import java.util.*;
import modules.codegas.*;
import modules.gradient.*;
import modules.line.*;
import modules.node.*;

public class DFNLambda extends DFNode {
  Symbol name;
  Object[] args;
  public static Object init=null;

  public DFNLambda(double id, Symbol name, Object[] args, DFNPort[] ports)
  { super(id,ports); this.name=name; this.args=args; }

  // I'm just not bothering right now.

  // a lambda is primed if there's something in each of its arguments
  // (of, if it doesn't have arguments, it's got something in _nvl
  boolean isPrimed(Object callID,ActiveGradient ag) {
    return init!=null;
  }
  // to execute, do send through this shit.
  Hashtable execute(Object callID,ActiveGradient ag) {
    return sendToAll(ag,callID,init);
  }
}
