@alebeta06
Underused Solidity pattern: `using-for`
Verbose:
StockLib.decrease(stocks, id, qty);
With `using StockLib for mapping(...)`:
stocks.decrease(id, qty);
Same gas. Cleaner code. Methods on your types.
The value before the dot becomes the first arg.
Canonical Solidity pattern.