<div dir="auto"><div><div data-smartmail="gmail_signature"><br></div><div class="gmail_extra"><br><div class="gmail_quote">Den 4 dec 2017 20:25 skrev "Frerich Raabe" <<a href="mailto:raabe@froglogic.com">raabe@froglogic.com</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On 2017-12-04 20:05, mrx wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
If I have a function that produce tuples with three members and I want those members as parameters for a function that takes three parameters.<br>
How would I unpack that tuple?<br>
<br>
It seems that curry does the trick for tuples with two members.<br>
<br>
How do I do this when there are more than two members?<br>
</blockquote>
<br></div>
There are functions like 'curry3' ( <a href="http://hackage.haskell.org/package/utility-ht-0.0.14/docs/Data-Tuple-HT.html#v:curry3" rel="noreferrer" target="_blank">http://hackage.haskell.org/pac<wbr>kage/utility-ht-0.0.14/docs/<wbr>Data-Tuple-HT.html#v:curry3</a> ) but I think if you don't need this very often, it might be easiest to just go for<br>
<br>
  let (a,b,c) = f x in g a b c</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto">Ok, so in general I would have to write the unpacking myself. Correct?</div><div dir="auto"><br></div><div dir="auto">// Patrik</div></div>