Simplified implementation of Module class in combinatorics.py.