A `library` holds reusable functions. Internal library functions are inlined into your bytecode; external ones live at their own address and are reached by `delegatecall`, so they run in your storage context.
library Math {
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
}
using Math for uint256;
uint256 m = x.min(y);Libraries cannot hold state, receive ETH or be inherited.