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
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...
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...
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...
Haskell On Frequencies of trigrams in ...
by andreas,
November 17, 2010 16:06
using my previous approach ...
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....
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
As sargon suggested you mig...
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...
Haskell On Shortest Rot13
by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w,
November 15, 2010 19:48
thanks for the tips!
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...
Haskell On Generating the coordinates ...
by sargon,
October 21, 2010 20:41
Would be nice if you descri...
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
You could also reduce code ...
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
When you have a recursive f...
-- 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 ...
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...
import qualified Data.IntSet as IS radixSort = IS.toList . IS.fromList
Haskell On radixSort algorithm
by Thomas Salvador,
November 15, 2009 00:06
hi sargon:
radixsort is fa...
# 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 ...

D'oh, of course start posit...