           expr.power()
         else false
 
+      invokeOrDefault: (expr)->
+        result = @invoke(expr)
+        if @wasFound()
+          result
+        else
+          @action(expr)
+
     class_mixer(_FinalOpenSubExpressionApplcation)
 
 

        comps.expression.build expression: [comps.number.build(value: val*val)]
    class_mixer(Square)

    class Decimal
      invoke: (expression)->
        last = expression.last()
        if last instanceof comps.number
          new_last = last.clone()

    exports =
      calculate: Calculate
      square: Square
      append_decimal: AppendDecimal
      append_number: AppendNumber
      exponentiate_last: ExponentiateLast
      append_multiplication: AppendMultiplication
      append_addition: AppendAddition
      append_subtraction: AppendSubtraction
      negate_last: Negation
      open_sub_expression: OpenSub
      close_sub_expression: CloseSub
      append_division: AppendDivision
      pi: Pi
      square_root: SquareRoot

