Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1
-
1 2 3 4 5 6 7 8 9
import qualified Data.Set as Set primes::[Int] primes = 2: 3 : [x | x<-[5,7..], isPrime x] isPrime x = null $ [a|a<-(takeWhile (\p ->(p * p <= x)) primes), x `mod` a == 0] maxBoza::Int maxBoza = 1000000000 primesSet::Set.Set Int primesSet = Set.fromList $ takeWhile (<maxBoza) primes
...
-
1 2 3 4 5 6 7 8 9
import qualified Data.Set as Set primes::[Int] primes = 2: 3 : [x | x<-[5,7..], isPrime x] isPrime x = null $ [a|a<-(takeWhile (\p ->(p * p <= x)) primes), x `mod` a == 0] maxBoza::Int maxBoza = 1000 primesSet::Set.Set Int primesSet = Set.fromList $ takeWhile (<maxBoza) primes
...
-
1 2 3 4 5 6 7 8 9
import qualified Data.Set as Set primes::[Int] primes = 2: 3 : [x | x<-[5,7..], isPrime x] isPrime x = null $ [a|a<-(takeWhile (\p ->(p * p <= x)) primes), x `mod` a == 0] maxBoza::Int maxBoza = 1000 primesSet::Set.Set Int primesSet = Set.fromList $ takeWhile (<maxBoza) primes
...
-
1 2 3 4 5 6 7 8
{-# LANGUAGE RankNTypes , KindSignatures , ScopedTypeVariables , GADTs #-} {-# LANGUAGE PatternSignatures #-} -- for ideone type Id a b = forall (p :: * -> *) . p a -> p b {- (p x -> p a) and (AX p a x) are isomorphic -} data AX p a x where Embed :: (p x -> p a) -> AX p a x
...
-
1 2 3 4 5 6 7 8 9
{-# LANGUAGE RankNTypes , KindSignatures , ScopedTypeVariables , GADTs #-} type Id a b = forall (p :: * -> *) . p a -> p b {- (p x -> p a) and (AX p a x) are isomorphic -} data AX p a x where Embed :: (p x -> p a) -> AX p a x unwrap :: AX q a b -> (q b -> q a)
...
-
1 2 3 4 5 6 7 8 9
{-# LANGUAGE RankNTypes , KindSignatures , ScopedTypeVariables , GADTs #-} type Id a b = forall (p :: * -> *) . p a -> p b {- (p x -> p a) and (AX p a x) are isomorphic -} data AX p a x where Embed :: (p x -> p a) -> AX p a x unwrap :: AX q a b -> (q b -> q a)
...
-
1 2 3 4
let counting x = [x] ++ counting (x+1) doublec x = counting x ++ counting x in doublec 0
-
1 2 3 4 5
import Control.Applicative hiding ((,)) import Data.Monoid instance Monoid e => Applicative ((,) e) where pure x = (mempty, x) (u, f) <*> (v, x) = (u `mappend` v, f x)
-
1 2 3 4 5
import Control.Applicative import Data.Monoid instance Monoid e => Applicative ((,) e) where pure x = (mempty, x) (u, f) <*> (v, x) = (u `mappend` v, f x)
-
1 2 3 4
import Data.Monoid instance Monoid e => Applicative ((,) e) where pure x = (mempty, x) (u, f) <*> (v, x) = (u `mappend` v, f x)
-
1 2 3
instance Monoid e => Applicative ((,) e) where pure x = (mempty, x) (u, f) <*> (v, x) = (u `mappend` v, f x)
-
1 2 3 4 5 6 7 8 9
data Instruction = X | Y deriving Show breadthSearch target ((path, (x,y)):paths) | x == target = reverse path | otherwise = breadthSearch target $ paths ++ [(X:path, (x+y, y)) ,(Y:path, (x, x+y))] main = do
...
-
1 2 3 4 5 6 7 8 9
data Instruction = X | Y deriving Show breadthSearch target ((path, (x,y)):paths) | x == target = reverse path | otherwise = breadthSearch target $ paths ++ [(X:path, (x+y, y)) ,(Y:path, (x, x+y))] main = do
...
-
1 2 3 4 5 6 7 8 9
data Instruction = X | Y deriving Show breadthSearch target ((path, (x,y)):paths) | x == target = reverse path | otherwise = breadthSearch target $ paths ++ [(X:path, (x+y, y)) ,(Y:path, (x, x+y))] main = do
...
-
1 2 3 4 5 6 7 8 9
data Instruction = X | Y deriving Show breadthSearch target ((path, (x,y)):paths) | x == target = reverse path | otherwise = breadthSearch target $ paths ++ [(X:path, (x+y, y)) ,(Y:path, (x, x+y))] main = do
...
-
1 2 3 4 5 6 7 8 9
data Instruction = X | Y deriving Show breadthSearch target ((path, (x,y)):paths) | x == target = reverse path | otherwise = breadthSearch target $ paths ++ [(X:path, (x+y, y)) ,(Y:path, (x, x+y))] main = do
...
-
1 2 3 4
instance Num a => Num [a] where (+) = zipWith (+) main = print $ [[1, 2], [3]] + [[4, 5], [6]]
-
1 2 3 4
instance Num a => Num [a] where (+) = zipWith (+) main = print $ [[1, 2], [3]] + [[4, 5][6]]
-
1 2 3
fib n = take n f f = 0:1:zipWith (+) f (tail f) main = putStrLn . show $ fib 10
-
1 2 3 4 5 6 7 8 9
main = do x <- readNum if x == 42 then putStr("") else do putStr (show (x) ++ "\n") main where readNum :: IO Integer
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...
-
1 2 3 4 5 6 7 8
import Data.Maybe data Instruction = X | Y deriving Show instance Eq Instruction where X == X = True Y == Y = True _ == _ = False
...


