Monadic signals for asynchronous and reactive programming