fromKVList can be implemented in terms of foldl