One of the typical patterns in functional probabilistic programming is to apply a function whose identity is uncertain to arguments that are also uncertainty. Figaro's monadic Chain and Apply framework don't make it easy to do this. We should add a class of element over functions, and define an apply method on it, so you can write
One of the typical patterns in functional probabilistic programming is to apply a function whose identity is uncertain to arguments that are also uncertainty. Figaro's monadic Chain and Apply framework don't make it easy to do this. We should add a class of element over functions, and define an apply method on it, so you can write
f(x)
where f and x are both elements.