Compositionality in algorithms for smoothing | Synapse