abstractified types amap and amapgraph