[personal profile] sassa_nf
http://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:
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.

Date: 2016-08-08 08:14 am (UTC)
From: [identity profile] zeit-raffer.livejournal.com

'undefined' and 'seq' always break things

Date: 2016-08-08 08:55 am (UTC)
From: [identity profile] sassa-nf.livejournal.com
Yes, but in that article Mr. Gonzales is looking at which of the implementations is "better". Ie in the context it would mean one of the implementations "behaves well" with extend, the other one doesn't, and this equation is seen as the decider.

Profile

sassa_nf

February 2026

S M T W T F S
1234567
891011121314
15161718192021
222324252627 28

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2026 01:21 am
Powered by Dreamwidth Studios