Re[2]: [Haskell-cafe] Statements spanning multiple lines?

2005-12-23 Thread Bulat Ziganshin
Hello Greg, Thursday, December 22, 2005, 8:15:08 PM, you wrote: GB You might also like to try the slightly more efficient... GB pyth n = [(a,b,c) | a - [1..n], GB b - [a..n], GB c - [a+1..n], c - [b+1..n] is even better :) GB

Re: [Haskell-cafe] Statements spanning multiple lines?

2005-12-22 Thread J. Garrett Morris
On 12/22/05, Daniel Carrera [EMAIL PROTECTED] wrote: Hi all, How do I write a statement that spans multiple lines? I have this function: pythagoras n = [(a,b,c) | a -[1..n], b -[1..n], c -[1..n], a = b, b c, a*a + b*b == c*c] This should all be in one line. I know some ways to make the

Re: [Haskell-cafe] Statements spanning multiple lines?

2005-12-22 Thread Daniel Carrera
J. Garrett Morris wrote: Indent the second line: pythagoras n = [(a,b,c) | a -[1..n], b -[1..n], c -[1..n], a = b, b c, a*a + b*b == c*c] Thanks! Daniel. -- /\/`) http://oooauthors.org /\/_/ http://opendocumentfellowship.org /\/_/ \/_/I am

Re: [Haskell-cafe] Statements spanning multiple lines?

2005-12-22 Thread Greg Buchholz
Daniel Carrera wrote: Hi all, How do I write a statement that spans multiple lines? I have this function: pythagoras n = [(a,b,c) | a -[1..n], b -[1..n], c -[1..n], a = b, b c, a*a + b*b == c*c] This should all be in one line. I know some ways to make the line shorter, like

Re: [Haskell-cafe] Statements spanning multiple lines?

2005-12-22 Thread Greg Buchholz
You might also like to try the slightly more efficient... pyth n = [(a,b,c) | a - [1..n], b - [a..n], c - [a+1..n], a*a + b*b == c*c ] Greg Buchholz ___ Haskell-Cafe

Re: [Haskell-cafe] Statements spanning multiple lines?

2005-12-22 Thread Daniel Carrera
Greg Buchholz wrote: You might also like to try the slightly more efficient... pyth n = [(a,b,c) | a - [1..n], b - [a..n], c - [a+1..n], a*a + b*b == c*c ] Cool. I'm amazed that actually works. I've been writing