package skeb.expression;

/** An expression that represents the application of an operation to a list
  * of parameters.
  * @param operation The name of the operation.
  * @param arguments A list of reduced (constant) expressions that are the
                     operation's arguments. */
case class Apply (
  operation: String,
  arguments: List[Expression]
) extends Expression {
  
  /** A list of all cells this expression depends on. */
  def references =
    arguments flatMap { arg => arg.references }
  
}
