Reminds me of Haskell’s monad-bayes: https://monad-bayes.netlify.app/
oh! that's awesome, i had no idea haskell could express this things