G.Gonzales, Comonad Challenge Exercise
Aug. 8th, 2016 08:27 amhttp://www.haskellforall.com/2013/02/you-could-have-invented-comonads.html
Challenge Exercise: Prove that our original implementation of up' does not play nice with extend. In other words, find a counter-example that proves the following equation false:
What does he mean?
1. There is no need to look for counter-example, since it is false for any t, if we were to compare literally.
2. His previous statements about up' vs extend up were based on behavioural equality of the two, so motivating these challenges to find out which one was "correct". The behaviour of both sides is identical for all t. No? I tried even some cleverly placed undefined.
extend (\t' -> p (up' t')) t = extend p (up' t)
What does he mean?
1. There is no need to look for counter-example, since it is false for any t, if we were to compare literally.
2. His previous statements about up' vs extend up were based on behavioural equality of the two, so motivating these challenges to find out which one was "correct". The behaviour of both sides is identical for all t. No? I tried even some cleverly placed undefined.