On 02/11/2006, at 9:56 PM, [EMAIL PROTECTED] wrote:
G'day all.
Quoting Bernie Pope <[EMAIL PROTECTED]>:
This is a weird example of a pattern binding, and it is surprising
(to me) that the syntax is valid.
Maybe. But you wouldn't balk at this:
numzeroes xs = sum [ 1 | 0 <- xs ]
...e
On 11/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
G'day all.
Quoting Bernie Pope <[EMAIL PROTECTED]>:
> This is a weird example of a pattern binding, and it is surprising
> (to me) that the syntax is valid.
Maybe. But you wouldn't balk at this:
numzeroes xs = sum [ 1 | 0 <- xs ]
G'day all.
Quoting Bernie Pope <[EMAIL PROTECTED]>:
> This is a weird example of a pattern binding, and it is surprising
> (to me) that the syntax is valid.
Maybe. But you wouldn't balk at this:
numzeroes xs = sum [ 1 | 0 <- xs ]
...even if you wouldn't naturally express it that way. Pat
Hello Jason,
Thursday, November 2, 2006, 8:45:14 AM, you wrote:
> let 0 = 1 in 0
> let { 1 + 1 = 3; 3 + 1 = 7 } in 1 + 1 + 1
> Where you get 7.
these sippets looks cool :) they may be placed in somewhat like
Haskell puzzles
--
Best regards,
Bulatmailto:[EMAIL PRO
On 02/11/2006, at 4:45 PM, Jason Dagit wrote:
Hello,
I just found it (in ghci and hugs) that this is a valid haskell
program:
let 0 = 1 in 0
This program evaluates to 0 (to my surprise).
This is a weird example of a pattern binding, and it is surprising
(to me) that the syntax is valid
Hello,
I just found it (in ghci and hugs) that this is a valid haskell program:
let 0 = 1 in 0
This program evaluates to 0 (to my surprise).
I expected something similar to how this works:
let { 1 + 1 = 3; 3 + 1 = 7 } in 1 + 1 + 1
Where you get 7.
So, if the 0 is not used as an identifier (ie