Re: [Haskell-cafe] Do you trust Wikipedia?

2007-10-19 Thread Doug Quale
by the mathematical community. Truth has absolutely nothing to do with it. Wikipedia is a source-based encyclopedia, and when executed properly, its articles will reflect the biases of its sources. This should be mainstream, learned opinion in the field. See http://en.wikipedia.org/wiki/WP:V -- Doug

Re: [Haskell-cafe] Origins of (x:xs)?

2006-12-20 Thread Doug Quale
Paul Hudak [EMAIL PROTECTED] writes: As for x:xs, the xs is meant to be the plural of x, and is pronounced exs (I guess...). Similarly, n:ns is one n followed by many more ens. Make sense? I think this convention is often used in the Prolog community as well, as in X|Xs. -- Doug Quale

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-26 Thread Doug Quale
Udo Stenzel [EMAIL PROTECTED] writes: No, not the trailing slash. The difference between a directory and its contents is important enough. This is ususally encoded using a trailing slash, but I'd rather not worry about that detail in a program. What does Emacs do with double separators?

Re: [Haskell-cafe] Fibonacci numbers generator in Haskell

2006-06-16 Thread Doug Quale
Mathew Mills [EMAIL PROTECTED] writes: Is there anything that can be done (easily) to reduce the rounding errors? The hint that I gave before is one easy way. fib :: Integer - Integer fib x = let phi = ( 1 + sqrt 5 ) / 2 in truncate( ( 1 / sqrt 5 ) * ( phi ^ x + 0.5) ) You run out

Re: [Haskell-cafe] Fibonacci numbers generator in Haskell

2006-06-16 Thread Doug Quale
Doug Quale [EMAIL PROTECTED] writes: Mathew Mills [EMAIL PROTECTED] writes: Is there anything that can be done (easily) to reduce the rounding errors? The hint that I gave before is one easy way. fib :: Integer - Integer fib x = let phi = ( 1 + sqrt 5 ) / 2 in truncate

Re: [Haskell-cafe] Fibonacci numbers generator in Haskell

2006-06-15 Thread Doug Quale
Mathew Mills [EMAIL PROTECTED] writes: -- fib x returns the x'th number in the fib sequence fib :: Integer - Integer fib x = let phi = ( 1 + sqrt 5 ) / 2 phi' = ( 1 - sqrt 5 ) / 2 in truncate( ( 1 / sqrt 5 ) * ( phi ^ x - phi' ^ x ) ) -- Seems pretty quick to me, even