catacomb.c (mexp_common): Accept an arbitrary iterable.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 25 Nov 2019 13:19:45 +0000 (13:19 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:55:26 +0000 (12:55 +0100)
commit5d8da10545210a437cef3ba0348d125805349699
tree3dae057d7f9ee8a4c03a4bfe032f0954fdf716ea
parent01d4fd84ac24d20f8ebd8f16374f97373c1fc104
catacomb.c (mexp_common): Accept an arbitrary iterable.

This means that any iterable producing either (BASE, EXP) pair objects
or alternating BASE/EXP pairs can be used as input to any of the
multiple-exponentiation functions.  Of course, expecting an object with
unpredictable iteration order to produce a useful sequence of BASE/EXP
pairs will probably cause disappointment, but, for example, a dictionary
mapping bases to exponents seems like a reasonable thing to maintain.
catacomb.c
t/t-ec.py
t/t-mp.py