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>
Mon, 25 Nov 2019 17:51:34 +0000 (17:51 +0000)
commit74836df7a6a201ee0e87500621ae7d4f581de1e5
tree0e09a0b17b859d72c2c7645ca19b144a9ed14849
parentaf974107bce71db98fb962f1ed855f7b4153d3ef
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