[Haskell-cafe] Proof of duality theorem of fold?

Edward Kmett ekmett at gmail.com
Thu Mar 19 12:53:02 EDT 2009


I believe R J was consciously restricting himself to finite lists in the
original post.

2009/3/18 MigMit <miguelimo38 at yandex.ru>

> More interesting:
>
> foldl (flip const) whatever (repeat 1 ++ [1,2,3])
>
> Daniel Fischer wrote on 18.03.2009 15:17:
>
> Am Mittwoch, 18. März 2009 13:10 schrieb Daniel Fischer:
>>
>>> Now prove the
>>>
>>> Lemma:
>>>
>>> foldl g e (ys ++ zs) = foldl g (foldl g e ys) zs
>>>
>>> for all g, e, ys and zs of interest.
>>> (I don't see immediately under which conditions this identity could
>>> break,
>>> maybe there aren't any)
>>>
>>
>> Of course, hit send and you immediately think of
>>
>> foldl (flip const) whatever (undefined ++ [1,2,3])
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090319/d81403eb/attachment.htm


More information about the Haskell-Cafe mailing list