diff options
| author | polykernel <81340136+polykernel@users.noreply.github.com> | 2021-12-27 17:16:14 -0500 |
|---|---|---|
| committer | polykernel <81340136+polykernel@users.noreply.github.com> | 2021-12-27 18:17:52 -0500 |
| commit | a54f2231c9c4ea9e456511e855df11fe7df5ba71 (patch) | |
| tree | 64f6b3eef837d9716addede8ea7fd648514237ad /pkgs/development/python-modules/rangehttpserver | |
| parent | 410c054ad3441e06da54384695637ba2886fbbca (diff) | |
lib/attrset: optimize element access in recursiveUpdateUntil
- Eta reduce formal arguments of `recursiveUpdate'.
- Access elements in `recursiveUpdateUntil` using `elemAt` and `head`
directly instead of `head (tail xs)` which copies a singleton unnecessarily.
(`elemAt` is used instead of `last` to save a primitive call to `length`,
this is possible because the 2-tuple structure is guranteed)
- Use `length` instead of comparison to empty list to save a copy.
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions
