Say we have the following two functions :
getTweetsForUser( handle, callback )
And
expandShortLink ( stringHasLink, callback )
Please show how we would compose these with:
- A monad and
- An arrow
Assume the functions do not have side effects and please show how we would compose them and also carry a little bit of state, say a debugging log message.
Note: this is not homework, I am just looking to get some good, clear reference code for my own learning and programming with monads and arrows, thank you.