3 ms·
Or replace head with a better function.
by Peaker 13y ago
Or replace head with a better function.
- mercurial 13y agoSee the fantastic errors module, which has safe versions of head, etc.
- epsylon 13y agoOr use pattern matching.
- mercurial 13y agoPattern matching is great, you can usually use it instead of head, but you want something like Control.Error.Safe.tryRead to replace other unsafe functions like read.