DefineFunc acts as a convenience wrapper to calling Define and WrapFunc. Returns an error if shadowing is disabled and the name is already defined.
(store Storelike, module, name string, f interface{})
| 83 | // |
| 84 | // Returns an error if shadowing is disabled and the name is already defined. |
| 85 | func (l *Linker) DefineFunc(store Storelike, module, name string, f interface{}) error { |
| 86 | return l.Define(store, module, name, WrapFunc(store, f)) |
| 87 | } |
| 88 | |
| 89 | // FuncNew defines a function in this linker in the same style as `NewFunc` |
| 90 | // |