charles-river-analytics / figaro

Figaro Programming Language and Core Libraries
Other
757 stars 153 forks source link

Functional uncertainty #138

Open apfeffer opened 10 years ago

apfeffer commented 10 years ago

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.

motownblue commented 10 years ago

also work where f is an element and x is value