Re: [Haskell-cafe] speeding up fibonacci with memoizing

2007-02-18 Thread Mikael Johansson
On Sun, 18 Feb 2007, Yitzchak Gale wrote: Besides memoizing, you might want to use the fact that: fib (2*k) == (fib (k+1))^2 - (fib (k-1))^2 fib (2*k-1) == (fib k)^2 + (fib (k-1))^2 Or, you know, go straight to the closed form for the fibonacci numbers! :) -- Mikael Johansson

Re: [Haskell-cafe] factorising to prime numbers

2007-02-09 Thread Mikael Johansson
= f . map (uncurry min) -- Mikael Johansson | To see the world in a grain of sand [EMAIL PROTECTED]| And heaven in a wild flower http://www.mikael.johanssons.org | To hold infinity in the palm of your hand | And eternity

Re: [Haskell-cafe] How did you stumble on Haskell?

2007-02-08 Thread Mikael Johansson
. -- Mikael Johansson | To see the world in a grain of sand [EMAIL PROTECTED]| And heaven in a wild flower http://www.mikael.johanssons.org | To hold infinity in the palm of your hand | And eternity for an hour

Re: [Haskell-cafe] Re: How did you stumble on Haskell?

2007-02-07 Thread Mikael Johansson
On Tue, 6 Feb 2007, Jesse Tov wrote: Mikael Johansson wrote: I read sigfpe and got interested. I read sigsegv and got interested :) That's also a blogger writing about Haskell? Or am I missing a joke here? Jesse -- Mikael Johansson | To see the world in a grain

Re: [Haskell-cafe] Re: Re: nested maybes

2007-02-07 Thread Mikael Johansson
functional languages though, and I believe that one'd lose important intuition that way around. -- Mikael Johansson | To see the world in a grain of sand [EMAIL PROTECTED]| And heaven in a wild flower http://www.mikael.johanssons.org | To hold infinity in the palm of your

Re: [Haskell-cafe] Re: Re: nested maybes

2007-02-07 Thread Mikael Johansson
-- Mikael Johansson | To see the world in a grain of sand [EMAIL PROTECTED]| And heaven in a wild flower http://www.mikael.johanssons.org | To hold infinity in the palm of your hand | And eternity for an hour

Re: [Haskell-cafe] Literate Haskell source files. How do I turn them into something I can read?

2007-01-07 Thread Mikael Johansson
gaping (and highly distracting) stretches of whitespace while it takes out the markup. Doesn't something like egrep -v ^[^] solve it? -- Mikael Johansson | To see the world in a grain of sand [EMAIL PROTECTED]| And heaven in a wild flower http

[Haskell-cafe] List comparisons and permutation group code

2006-10-19 Thread Mikael Johansson
) Is there any sort of benefit to be won by using this construction instead of isIdentity (PL xs) = xs == [1..(length xs)] and if so, what? Best, -- Mikael Johansson | To see the world in a grain of sand [EMAIL PROTECTED]| And heaven in a wild flower http

Re: [Haskell-cafe] List comparisons and permutation group code

2006-10-19 Thread Mikael Johansson
On Thu, 19 Oct 2006, Mikael Johansson wrote: Comparing the code for permutationgropus at http://www.polyomino.f2s.com/david/haskell/codeindex.html with my own thoughts on the matter, I discover the one line to figure out whether a specific list represents the identity: isIdentity (PL xs

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Mikael Johansson
be embarrassing to the point the author is talking about. * Your subscribers don't want you to do it. Or, at least the ones who have bothered to read the docs for their mailer don't want you to do it. I'm a subscriber. I'd prefer munging. Cheers, Misha Best, -- Mikael Johansson

Re: [Haskell-cafe] [off-topic / administrative] List Reply-to

2006-10-11 Thread Mikael Johansson
On Wed, 11 Oct 2006, Udo Stenzel wrote: Mikael Johansson wrote: * It removes important information, which can make it impossible to get back to the message sender. This is the most important bit, actually. Anyone who wants to post a single question to haskell or haskell-cafe has