Select exhaustive lambda in function of order
Summary:
This is a partial backport of secp256k1 PR808 : https://github.com/bitcoin-core/secp256k1/pull/808/commits/cec7b18a34e68adb04f31a71a2eb4c5fc97674ce
Depends on D7658
Test Plan:
ninja check-secp256k1
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7659