startRow <- randomRIO (0 :: Int, rows - 1)
    startColumn <- randomRIO (0 :: Int, columns - 1)
    seeds <- replicateM (rows * columns) (randomRIO (0 :: Int, (max rows columns)))
...

Haskell On Maze generator

by jarkko, September 11, 2011 22:51

D'oh, of course start posit...

630067ad4c10410798d1550152f20d41 Talk
module Main where
import Data.IORef
import Data.List
...

Haskell On Graham scan

by jarkko, September 10, 2011 06:03

erisco, you're right. There...

630067ad4c10410798d1550152f20d41 Talk
module Currency where

import Text.Regex.Posix
...

Haskell On Simple US currency parser

by jarkko, September 03, 2011 03:03

Was required to have also c...

630067ad4c10410798d1550152f20d41 Talk
module Currency where

import Text.Regex.Posix
...

Haskell On Simple US currency parser

by jarkko, September 03, 2011 00:10

D'oh. Of course with regula...

630067ad4c10410798d1550152f20d41 Talk
module Currency where

import Text.Regex.Posix
...

Haskell On Simple US currency parser

by jarkko, September 03, 2011 00:10

D'oh. Of course with regula...

630067ad4c10410798d1550152f20d41 Talk

Haskell On Frequencies of trigrams in ...

by andreas, November 17, 2010 16:06

using my previous approach ...

D41d8cd98f00b204e9800998ecf8427e Talk
import Data.Map (Map)
import qualified Data.Map as Map

...

Haskell On Frequencies of trigrams in ...

by andreas, November 17, 2010 15:47

I had another look at this....

D41d8cd98f00b204e9800998ecf8427e Talk
import Data.Map

type Frequencies = Map Char (Map Char (Map Char Int))
...

Haskell On Frequencies of trigrams in ...

by andreas, November 17, 2010 14:35 Star_fullStar_fullStar_fullStar_fullStar_full

As sargon suggested you mig...

D41d8cd98f00b204e9800998ecf8427e Talk
type Trigram a = (a,a,a)

allTrigrams :: [a] -> [Trigram  a]
...

Haskell On Frequencies of trigrams in ...

by sargon, November 17, 2010 14:20

First, avoid using (!!) ins...

55ca8e1248605bf5e1819ce2c47c160f Talk

Haskell On Shortest Rot13

by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w, November 15, 2010 19:48

thanks for the tips!

Cf3ca7d0045e5f823c16d5f6b7687060 Talk

Haskell On Shortest Rot13

by bob, November 11, 2010 05:53 Star_fullStar_fullStar_fullStar_fullStar_full

you're missing a right pare...

D41d8cd98f00b204e9800998ecf8427e Talk

Haskell On Generating the coordinates ...

by https://www.google.com/accounts/o8/id?id=AItOawmS67NjpPtMA53HhDGkBlAqrD7qnI3Rkbk, October 22, 2010 18:00

Nevermind, I came up with s...

55502f40dc8b7c769880b10874abc9d0 Talk

Haskell On Generating the coordinates ...

by sargon, October 21, 2010 20:41

Would be nice if you descri...

D41d8cd98f00b204e9800998ecf8427e Talk
handleFirstPing :: IRCHandle -> ChannelName -> IO ()
handleFirstPing nh channel = handleFirstPing' nh channel 0
 where handleFirstPing' :: IRCHandle -> ChannelName -> Int -> IO ()
...

Haskell On Don't like that explicit 0 ...

by sargon, September 25, 2010 13:51 Star_fullStar_fullStar_fullStar_fullStar_full

You could also reduce code ...

D41d8cd98f00b204e9800998ecf8427e Talk
handleFirstPing :: IRCHandle -> ChannelName -> IO ()
handleFirstPing nh channel = handleFirstPing' nh channel 0
   where handleFirstPing' :: IRCHandle -> ChannelName -> Int -> IO ()
...

Haskell On Don't like that explicit 0 ...

by bob, September 24, 2010 06:56 Star_fullStar_fullStar_fullStar_fullStar_full

When you have a recursive f...

D41d8cd98f00b204e9800998ecf8427e Talk

Haskell On radixSort algorithm

by SemenovEvgeni, July 22, 2010 11:26

it was very interesting to ...

928b47489462b9301d8e7026d9b074cf Talk
-- Your second example is completely contrived, seeing as the user has to annotate a type anyway, you could just write:
is_complex_simple = False
is_complex_complex = True
...

Haskell On Function to check the data ...

by liamoc, December 26, 2009 14:47
F6cb924dfb4488d701934a5485f5fa24 Talk
data Simple = Myint Int | Mydouble Double | Mystring String deriving (Eq, Show)
data Complex = Struct String [(String,Simple)] deriving (Eq, Show)

...

Haskell On Function to check the data ...

by headcrab.myopenid.com, December 08, 2009 22:19

Have written this variation...

25c35e90595b236da0fee29edb70db7f Talk

Haskell On radixSort algorithm

by Jedai, November 21, 2009 20:37

To have an idea of the perf...

Dc61c1b2045efa54375188bdb6a33945 Talk
import qualified Data.IntSet as IS

radixSort = IS.toList . IS.fromList

Haskell On radixSort algorithm

by Jedai, November 21, 2009 18:29

Ok... radix sort by itself ...

Dc61c1b2045efa54375188bdb6a33945 Talk

Haskell On radixSort algorithm

by sargon, November 16, 2009 23:44

joa.
But this is only a lan...

55ca8e1248605bf5e1819ce2c47c160f Talk

Haskell On radixSort algorithm

by Thomas Salvador, November 15, 2009 00:06

hi sargon:

radixsort is fa...

34db50b7ce2e115afadf5a765b950739 Talk

Haskell On radixSort algorithm

by sargon, November 10, 2009 09:37

why radixsort ?
Doesn't fi...

55ca8e1248605bf5e1819ce2c47c160f Talk
# Imports [haskell]
import Data.List (groupBy)
import Control.Arrow ((&&&))
...

Haskell On compressing an array of int...

by Kim Burgestrand, October 21, 2009 04:58

I realize this is old, but ...

D41d8cd98f00b204e9800998ecf8427e Talk

Haskell On Graham scan

by erisco, July 10, 2009 23:32

Your implementation has som...

D41d8cd98f00b204e9800998ecf8427e Talk