Re: [Haskell-cafe] help in tree folding

2008-05-08 Thread Brent Yorgey
On Wed, May 7, 2008 at 6:28 AM, patrik osgnach [EMAIL PROTECTED] wrote: Daniel Fischer ha scritto: Am Dienstag, 6. Mai 2008 22:40 schrieb patrik osgnach: Brent Yorgey ha scritto: On Tue, May 6, 2008 at 8:20 AM, patrik osgnach [EMAIL PROTECTED] wrote: Hi. I'm learning haskell but i'm

Re: [Haskell-cafe] help in tree folding

2008-05-07 Thread patrik osgnach
Daniel Fischer ha scritto: Am Dienstag, 6. Mai 2008 22:40 schrieb patrik osgnach: Brent Yorgey ha scritto: On Tue, May 6, 2008 at 8:20 AM, patrik osgnach [EMAIL PROTECTED] wrote: Hi. I'm learning haskell but i'm stuck on a generic tree folding exercise. i must write a function of this type

[Haskell-cafe] help in tree folding

2008-05-06 Thread patrik osgnach
Hi. I'm learning haskell but i'm stuck on a generic tree folding exercise. i must write a function of this type treefoldr::(Eq a,Show a)=(a-b-c)-c-(c-b-b)-b-Tree a-c Tree has type data (Eq a,Show a)=Tree a=Void | Node a [Tree a] deriving (Eq,Show) as an example treefoldr (:) [] (++) [] (Node '+'

Re: [Haskell-cafe] help in tree folding

2008-05-06 Thread patrik osgnach
Luke Palmer ha scritto: On Tue, May 6, 2008 at 6:20 AM, patrik osgnach [EMAIL PROTECTED] wrote: Hi. I'm learning haskell but i'm stuck on a generic tree folding exercise. i must write a function of this type treefoldr::(Eq a,Show a)=(a-b-c)-c-(c-b-b)-b-Tree a-c Tree has type data (Eq a,Show

Re: [Haskell-cafe] help in tree folding

2008-05-06 Thread patrik osgnach
Brent Yorgey ha scritto: On Tue, May 6, 2008 at 8:20 AM, patrik osgnach [EMAIL PROTECTED] wrote: Hi. I'm learning haskell but i'm stuck on a generic tree folding exercise. i must write a function of this type treefoldr::(Eq a,Show a)=(a-b-c)-c-(c-b-b)-b-Tree a-c Tree has type data (Eq a,Show

Re: [Haskell-cafe] help in tree folding

2008-05-06 Thread Daniel Fischer
Am Dienstag, 6. Mai 2008 22:40 schrieb patrik osgnach: Brent Yorgey ha scritto: On Tue, May 6, 2008 at 8:20 AM, patrik osgnach [EMAIL PROTECTED] wrote: Hi. I'm learning haskell but i'm stuck on a generic tree folding exercise. i must write a function of this type treefoldr::(Eq a,Show