Concepts
Strategy contract
The caller depends on a stable callable contract, not a specific implementation.
Formal Syntax & Structure
javascript syntaxjavascript
quote(quantity, calculateFee)Working Example
Example Snippetjavascript
(async () => {const quote=(n,fee)=>n*5+fee(n);console.log(quote(3,n=>2),quote(3,n=>n));})()