SingletonBinaryBinding creates a singleton function definition to be used with all function overloads. Note, this approach works well if operand is expected to have a specific trait which it implements, e.g. traits.ContainerType. Otherwise, prefer per-overload function bindings.
(fn functions.BinaryOp, traits ...int)
| 271 | // Note, this approach works well if operand is expected to have a specific trait which it implements, |
| 272 | // e.g. traits.ContainerType. Otherwise, prefer per-overload function bindings. |
| 273 | func SingletonBinaryBinding(fn functions.BinaryOp, traits ...int) FunctionOpt { |
| 274 | return decls.SingletonBinaryBinding(fn, traits...) |
| 275 | } |
| 276 | |
| 277 | // SingletonFunctionImpl creates a singleton function definition to be used with all function overloads. |
| 278 | // |