bind method

HTFunction bind(
  1. HTStruct struct
)

Implementation

HTFunction bind(HTStruct struct) {
  if (category == FunctionCategory.literal) {
    return clone()
      ..namespace = struct.namespace
      ..instance = struct;
  } else {
    throw HTError.binding();
  }
}