Am Dienstag, 26. August 2003 05:54 schrieb Matt Harden:
> Cool! That leads me to this contraption:
> > tricky= 0 : enigma tricky tricky
> > enigma (k : ks) = (k :) . labyrinth (enigma ks)
> > labyrinth f (k : _ : ks) = (k + 1) : f ks
>
> Figure out what `
On Tue, Aug 26, 2003 at 02:00:32PM +0200, Per Larsson wrote:
> I have problems finding a pleasing indentation style for haskell code.
> Especially nested do-blocks have a tendency to run away to the right margin.
> When looking on source code from experienced haskell programmers, there
> seems not
On Thursday, 2003-08-14, 13:37, CEST, blaat blaat wrote:
> [...]
Hello,
I don't know exactly which of the following questions have already been
answered but I decided to answer them all anyway.
> What is the difference between putStr "a", (putStr "a", putStr "a"), putStr
> (putStr "a"), putStr
> My Haskell experiments have reached a size in which debugging tools would be
> more than welcome, so I looked around, and was very disappointed. I tried
> Hood, which is a pain to use (lots of editing of the code required), I looked
> at Buddha but didn't want to downgrade to GHC 5 for trying
On Tue, Aug 26, 2003 at 05:27:11PM +0200, Konrad Hinsen wrote:
> My Haskell experiments have reached a size in which debugging tools would
> be more than welcome, so I looked around, and was very disappointed. I
> tried Hood, which is a pain to use (lots of editing of the code
> required), I looked
On Friday 22 August 2003 04:29 pm, Ralf Hinze wrote:
> | Seeing as its thst time of year again and everyone is posting their
> | homework, has anyone got any good puzzles to do?
> | I wouldn't mind having a go at something a bit tricky.
>
> Here is another one: figure out what `unknown' is.
>
> > u
My Haskell experiments have reached a size in which debugging tools would be
more than welcome, so I looked around, and was very disappointed. I tried
Hood, which is a pain to use (lots of editing of the code required), I looked
at Buddha but didn't want to downgrade to GHC 5 for trying it (nor
>- There needs to be some support from the
> compilers/interpreters. Hugs
> already has this. Ghc has some of it, but I abuse the
> profiling system
> in order to get the names of constructors to be present
> on the heap.
> I'm not happy with this. Under normal compilation
If your code goes out to far right, it's a good idea to
make a function out of it.
> main = do
> args <- getArgs
> case args of
> (fname:_) -> normalOp
> _-> helpScreen
>
> normalOp = do
> ...
>
> helpScreen = putStrLn helpStr
Code should be formatted in a way easy to scan
Hi,
I have problems finding a pleasing indentation style for haskell code.
Especially nested do-blocks have a tendency to run away to the right margin.
When looking on source code from experienced haskell programmers, there
seems not to be any consensus at all, everyone uses their own convention
> Here's one: figure out what the following does :-)
> puzzle = (!!) $ map (1:) $ iterate (s (lzw (+)) (1:)) [] where
> s f g x = f x (g x)
> lzw op xs [] = xs
> lzw op [] ys = ys
> lzw op (x:xs) (y:ys) = op x y : lzw op xs ys
Can be written simpler
puzzle = (!!) $ iterate (s (
11 matches
Mail list logo