Re: [Haskell-cafe] Thompson's Exercise 9.13

2005-04-15 Thread Hamilton Richards
At 10:50 AM +0900 2005/4/16, Kaoru Hosokawa wrote: My solution based on Bernie's solution: init :: [a] -> [a] init xs = foldr (left (length xs)) xs xs left :: Int -> a -> [a] -> [a] left n x xs | n == length xs = [] | otherwise = x : xs I use the foldr return value for the empty list

Re: [Haskell-cafe] Thompson's Exercise 9.13

2005-04-15 Thread Kaoru Hosokawa
My solution based on Bernie's solution: init :: [a] -> [a] init xs = foldr (left (length xs)) xs xs left :: Int -> a -> [a] -> [a] left n x xs | n == length xs = [] | otherwise = x : xs I use the foldr return value for the empty list as the input itself. Use this value as a marker t

[Haskell-cafe] Re: Thompson's Exercise 9.13

2005-04-15 Thread Kaoru Hosokawa
I just realized that I was not replying to the list. Sorry about that and thank you all for contributing to the thread. -- Kaoru Hosokawa [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/ha

RE: [Haskell-cafe] GHC Survey source?

2005-04-15 Thread Alson Kemp
From: Tomasz Zielonka [mailto:[EMAIL PROTECTED] >You can get the code from http://www.haskell.org/~tomasz/ghc-survey/. Perfect. >If you want, I can put a BSD-style license on the code. I'm interested in it purely as an additional educational example, so am not too concerned about the license.

[Haskell-cafe] Do you use GHC?

2005-04-15 Thread Simon Peyton-Jones
Dear Haskell folk, PLEASE READ THIS IF YOU USE THE Glasgow Haskell Compiler (GHC). I virtually never send messages to overlapping sets of lists, but I'm doing so this time, because I'd really like to get to everyone who uses GHC. Here at GHC HQ, we are often asked how many people use GHC, and w

Re: [Haskell-cafe] GHC Survey source?

2005-04-15 Thread Tomasz Zielonka
On Fri, Apr 15, 2005 at 10:02:08AM -0400, Alson Kemp wrote: > Simons, > Would y'all hand out the source code for the survey @ > http://www.haskell.org/ghc/survey/start.cgi? I looked through the CVS repo > but couldn't find it. Aside from generalities (GHC, WASH, etc), I wanted to > see some

[Haskell-cafe] GHC Survey source?

2005-04-15 Thread Alson Kemp
Simons, Would y'all hand out the source code for the survey @ http://www.haskell.org/ghc/survey/start.cgi? I looked through the CVS repo but couldn't find it. Aside from generalities (GHC, WASH, etc), I wanted to see some actual web programming with Haskell. Thanks, Also