Efficient List Building

Build lists efficiently using prepend operations and Enum.reverse/1 instead of append. Appending to lists is O(n) while prepending is O(1). Use [head | tail] notation and reverse at the end when order matters.

blockscout 4503c80 6.9 KB Updated

File contents

blockscout/blockscout/tree/main/.agents/skills/efficient-list-building commit 4503c80f1a

Frequently asked questions

npx skillmds@latest add blockscout/efficient-list-building