A Pattern for Almost Compositional Functions