Sanity check:
- f p = [x, x+1]
- s q = [x*x, x+x]
- >=> f s 7 = [49, 14, 64, 16]
+ f p = [x, x+1]
+ s q = [x*x, x+x]
+ >=> f s 7 = [49, 14, 64, 16]
3. Do the same for zippy lists. That is, you need to find a
composition operator such that
- f p = [x, x+1]
- s q = [x*x, x+x]
- >=> f s 7 = [49, 64]
+ f p = [x, x+1]
+ s q = [x*x, x+x]
+ >=> f s 7 = [49, 64]
and then prove it obeys the monad laws.