<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 24, 2015 at 8:12 PM, Janis Voigtländer <span dir="ltr"><<a href="mailto:janis.voigtlaender@gmail.com" target="_blank">janis.voigtlaender@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>It has already been established in this thread what Charles meant by 3.<br><br></div>He meant that a fold-function that has the property he is after would guarantee that it:<br></div><br>a) takes all the content elements from a data structure, say x1,...,xn,<br><br></div>b) builds an application tree with the to-be-folded, binary operation f in the internal nodes of a binary tree, whose leafs, read from left to right, form exactly the sequence x1,...,xn,<br><br></div>c) evaluates that application tree.<br><br></div>Do you agree that what I describe above is a property of a given fold-like function, not of the f handed to that fold-like function?<br></div></div></blockquote><div><br><div class="gmail_default" style="font-family:monospace,monospace">I might lack some basic knowledge, so thanks for asking.<br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">What does it mean to take all the content elements from a data structure?<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">If one has f a = Bool -> a, and a value<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">xs :: f Int<br></div><div class="gmail_default" style="font-family:monospace,monospace">xs True  = 2<br></div><div class="gmail_default" style="font-family:monospace,monospace">xs False = 3<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">what are x1 and x2?<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">Best,<br></div><div class="gmail_default" style="font-family:monospace,monospace">Matteo<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">PS. I won't be able to read the answer before tomorrow. :-)<br></div></div></div></div></div>