semantic actions as functors