Review by @thinca

- use numbered functions
- use Data.List
- use :throw instead of :echoerr