module Maze where import Control.Monad ...
Haskell Maze generator
by jarkko,
September 10, 2011 05:20,
1 refactoring
module ReformatText(main) where import System(getArgs) ...
Haskell Text reformatter
by jarkko,
September 06, 2011 01:12,
No refactoring
Wrote a text reformatter as...
currency [] = error "empty string" currency (x:[]) = error "invalid string" currency (x:xs) ...
Haskell Simple US currency parser
by jarkko,
September 02, 2011 13:08,
3 refactorings
Skimmed through the book "S...
import Data.Packed.Matrix import System.Environment import System.Posix.Unistd ...
Haskell Game of Life in Haskell
by https://www.google.com/accounts/o8/id?id=AItOawmBVe2Qh_TO2UNRW1mfzLCWTyNyTytCJO4,
February 24, 2011 00:11,
No refactoring, tagged with haskell, game of life
I've been learning Haskell ...
/// Rotates a list by one place forward.
let rotate lst =
List.tail lst @ [List.head lst]
...
Haskell Combination and Permutation...
by https://www.google.com/accounts/o8/id?id=AItOawnKDqoH-UcpVbtsfwJBE19476rOzrIq9wU,
December 21, 2010 01:26,
No refactoring, tagged with permutations, f#, combinations
Note: code is actually F#.
...
{- Getting the frequencies of all trigrams in a word -}
module TrigramFrequency (frequencies) where
...
Haskell Frequencies of trigrams in ...
by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w,
November 17, 2010 08:29,
4 refactorings, tagged with word, cryptography
Any suggestions about refac...
r13 w = map (\c -> chr ((((ord c + 13) - 97) `mod` 26) + 97) w
Haskell Shortest Rot13
by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w,
November 08, 2010 22:40,
2 refactorings, tagged with short
Compo shortest rot 13
g = getLine r = toRational c = concat ...
Haskell EGCD
by https://www.google.com/accounts/o8/id?id=AItOawkpAfEP31fRzpQ5wtVTGKZAHPi6zN5xh4w,
November 08, 2010 08:18,
No refactoring, tagged with short
please refactor to less cha...
newtype Coord = Coord (Int, Int) deriving (Eq) data Square = Square Coord Coord ...
Haskell Generating the coordinates ...
by https://www.google.com/accounts/o8/id?id=AItOawmS67NjpPtMA53HhDGkBlAqrD7qnI3Rkbk,
October 12, 2010 23:11,
2 refactorings, tagged with short lists
Is there a shorter, smarter...
type IRCHandle = Handle type LogHandle = Handle type ChannelName = String ...
Haskell Don't like that explicit 0 ...
Well, the title says it all...
module Main where import Graphics.UI.Gtk ...
Haskell Haskell walpaper slide
by https://me.yahoo.com/a/qdKngNhttsa6hMTIgvidvwP6cBSbEMaU6J9FYay5lNJXMn9X,
August 03, 2010 17:04,
No refactoring
The user gives minutes and ...
module Main where import Text.XML.HaXml ...
Haskell Code from a novice Haskell ...
It's a simple command-line ...
class IsComplex a where
isComplex :: a -> Bool
...
Haskell Function to check the data ...
For two given data types, S...
import Control.Monad (mapM_, liftM) import Data.List (sort) import qualified Data.ByteString.Lazy.Char8 as L ...
Haskell radixSort algorithm
I'm trying to implement a s...
compress :: [Int] -> [[Int]]
compress (x:xs) = let (y,ys) = walk x xs
in [x,y]:compress ys
...
Haskell compressing an array of int...
I took the idea from "Alec ...
import Prelude hiding (lookup) import System.Random import Control.Monad ...
Haskell Pseudo Genetic Programming
This code probably needs cl...
main = do s <- getContents
putStr (unlines (reverse (rotate (lines s))))
...
Haskell Cat90
Rotates text given in stdin...
module Main where import List import Text.Regex.Posix ...
Haskell Graham scan
My first experiment with Ha...
import System.IO import Data.Word ...
Haskell Raytracer in haskell
by jaggederest,
September 01, 2008 21:23,
1 refactoring, tagged with vector, haskell, raytracer, linear algebra
This is my first serious ha...
Depth-first search based ma...