Re: Function, signatures and tuples

2010-11-16 Thread Pelle MÃ¥nsson
On 11/13/2010 11:43 AM, Russel Winder wrote: On Sat, 2010-11-13 at 08:18 +, Iain Buclaw wrote: [ . . . ] import std.typecons; ? Hummm... I thought I had put that in but clearly I had not :-(( OK so that explains the bulk of the problems on this code, I knew it was something stupid on my

Re: Function, signatures and tuples

2010-11-13 Thread Russel Winder
On Fri, 2010-11-12 at 11:15 -0800, Andrei Alexandrescu wrote: On 11/12/10 11:13 AM, Russel Winder wrote: Is there an easy explanation of why I cannot do: real partialSum ( immutable Tuple ! ( long , long , real ) data ) but instead have to do: real

Re: Function, signatures and tuples

2010-11-13 Thread Iain Buclaw
== Quote from Russel Winder (rus...@russel.org.uk)'s article On Fri, 2010-11-12 at 11:15 -0800, Andrei Alexandrescu wrote: On 11/12/10 11:13 AM, Russel Winder wrote: Is there an easy explanation of why I cannot do: real partialSum ( immutable Tuple ! ( long , long , real )

Re: Function, signatures and tuples

2010-11-13 Thread Russel Winder
On Sat, 2010-11-13 at 08:18 +, Iain Buclaw wrote: [ . . . ] import std.typecons; ? Hummm... I thought I had put that in but clearly I had not :-(( OK so that explains the bulk of the problems on this code, I knew it was something stupid on my part, thanks for spotting it. However, now we

Function, signatures and tuples

2010-11-12 Thread Russel Winder
Is there an easy explanation of why I cannot do: real partialSum ( immutable Tuple ! ( long , long , real ) data ) but instead have to do: real partialSum ( T ... ) ( T data ) to be frank I really don't get this latter which is what compiles -- I have no idea if it

Re: Function, signatures and tuples

2010-11-12 Thread Andrei Alexandrescu
On 11/12/10 11:13 AM, Russel Winder wrote: Is there an easy explanation of why I cannot do: real partialSum ( immutable Tuple ! ( long , long , real ) data ) but instead have to do: real partialSum ( T ... ) ( T data ) to be frank I really don't get this latter