Skip to content

Instantly share code, notes, and snippets.

@Kdan
Created July 5, 2020 20:07
Show Gist options
  • Select an option

  • Save Kdan/aef816ca438b46294b83d91fcba409ee to your computer and use it in GitHub Desktop.

Select an option

Save Kdan/aef816ca438b46294b83d91fcba409ee to your computer and use it in GitHub Desktop.
/// A `FunctionCall` corresponds to the trigger of a function.
struct FunctionCall: Hashable {
/// The name of the function
let name: String
/// The parameters sent to the function.
let parameters: [Any?]
/// The number of times the function has been called.
let calls: Int
static func == (lhs: FunctionCall, rhs: FunctionCall) -> Bool {
lhs.name == rhs.name
}
public func hash(into hasher: inout Hasher) {
hasher.combine(name)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment