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 2 3 4 5 6 7 8
using System; public module HelloWorld { public Main() : void { Console.WriteLine("Hello world!"); } }
-
1 2 3 4 5 6 7 8 9
/* read the numbers; notice: ech line of the input must be followed by an EOF character */ x = read(); /* multiplication table */ for (i=1; i<=x; ++i) { for (j=1; j<=x; ++j) print i*j, "\t" print "\n" }
...
-
1 2 3
commonElements :: Eq a => [a] -> [a] -> Bool commonElements x y = or (map (or . ((flip map) y)) (map (==) x))
-
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
primes :: [Integer] -> [Integer] primes [] = [] primes (x:xs) = x : (primes $ filter ((\a b -> b `mod` a /= 0) x) xs) main = print $ take 100 $ primes [2..]
-
1 2 3 4 5 6 7 8 9
module Main where import System import Data.List.Split(splitOn) import Data.Bits readIp :: String -> Int readIp s = fst $ foldl f (0, 1) octets
...
-
1 2 3 4
main = do putStrLn "Please enter your name: " name <- getLine putStrLn ("Hello, " ++ name ++ ", how are you?")
-
1 2 3 4
main = do putStrLn "Please enter your name: " name <- getLine putStrLn ("Hello, " ++ name ++ ", how are you?")
-
1 2 3 4 5 6
import System.IO quicksort [] = [] quicksort (x:xs) = quicksort [y | y <- xs, y < x] ++ [x] ++ quicksort [y | y <- xs, y >= x] main = print . quicksort =<< getLine
-
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
module Main where main = print (sum [])
-
1 2 3
module Main where main = print (product [])
-
1
product []
-
1
inc 5
-
1
-
1 2 3 4 5 6 7 8 9
χ=w++b w="♙♢♤♔♕♖♗♘";b="♟♦♠♚♛♜♝♞" μ=t⤀ζ++((\(x,y)->(x,-y))⤀)⤀μ q c|((_,m):_)<-((==c).fst)☂(χ⋎μ)=m t(x:y:l)=(d x,d y):t l;t _=[] d c=fromEnum c-78 ζ=["NM","NL","MMMNMONMNOOMONOO",σ++δ,σ,δ,"MLOLPMPOOPMPLOLM","MMOM"] σ=l>>=(\c->'N':c:c:"N") δ=[l⋎l,reverse l⋎l]>>=(>>=(\(l,r)->[l,r]))
...
-
1 2 3 4 5 6 7 8 9
χ=w++b w="♙♢♤♔♕♖♗♘";b="♟♦♠♚♛♜♝♞" μ=t⤀ζ++((\(x,y)->(x,-y))⤀)⤀μ q c|((_,m):_)<-((==c).fst)☂(χ⋎μ)=m t(x:y:l)=(d x,d y):t l;t _=[] d c=fromEnum c-78 ζ=["NM","NL","MMMNMONMNOOMONOO",σ++δ,σ,δ,"MLOLPMPOOPMPLOLM","MMOM"] σ=l>>=(\c->'N':c:c:"N") δ=[l⋎l,reverse l⋎l]>>=(>>=(\(l,r)->[l,r]))
...
-
1 2 3 4 5
module Main (main) where import Data.Functor.Syntax as S main = print $ S.flip (Just length) "foo"
-
1 2 3 4 5 6 7 8 9
module Main where import Control.Applicative import Control.Monad import Data.Bits import Data.Char import Data.Word import Data.Function import Text.ParserCombinators.ReadP
...
-
1 2 3 4 5 6 7 8 9
module Main where import Control.Applicative import Control.Monad import Data.Bits import Data.Char import Data.Word import Data.Function import Text.ParserCombinators.ReadP
...
-
1 2 3 4 5 6 7 8 9
import Text.Printf test::Int->[Double]->[String] test 0 _ = [] test n (numPnts:rest) = ((printf "%.2f" xMeanFloat) ++ " " ++ (printf "%.2f" yMeanFloat)):(test (n - 1) nextRest) where calc (x, y, 0) x' = (x + x', y, 1) calc (x, y, 1) y' = (x, y + y', 0) (thisList, nextRest) = splitAt (2 * (round numPnts)) rest
...
-
1 2 3 4 5 6 7 8 9
import Text.Printf test::Int->[Double]->[String] test 0 _ = ["\n"] test n (numPnts:rest) = ((printf "%.2f" xMeanFloat) ++ " " ++ (printf "%.2f" yMeanFloat)):(test (n - 1) nextRest) where calc (x, y, 0) x' = (x + x', y, 1) calc (x, y, 1) y' = (x, y + y', 0) (thisList, nextRest) = splitAt (2 * (round numPnts)) rest
...
-
1 2 3 4 5 6 7 8 9
import Text.Printf test::Int->[Double]->[String] test 0 _ = [] test n (numPnts:rest) = ((printf "%.2f" xMeanFloat) ++ " " ++ (printf "%.2f" yMeanFloat)):(test (n - 1) nextRest) where calc (x, y, 0) x' = (x + x', y, 1) calc (x, y, 1) y' = (x, y + y', 0) (thisList, nextRest) = splitAt (2 * (round numPnts)) rest
...
-
1 2 3 4 5 6 7 8 9
module Main where import Control.Applicative import Control.Monad import Data.Bits import Data.Char import Data.Word import Data.Function import Text.ParserCombinators.ReadP
...
-
1 2 3 4 5 6 7 8 9
module Main where import Control.Applicative import Control.Monad import Data.Bits import Data.Char import Data.Word import Data.Function import Text.ParserCombinators.ReadP
...
-
1 2 3 4 5 6 7 8 9
module Main where import Control.Applicative import Control.Monad import Data.Array import Data.Bits import Data.Char import Data.Word import Data.Function
...
-
1 2 3 4 5 6 7 8 9
module Main where import Control.Applicative import Control.Monad import Data.Array import Data.Bits import Data.Char import Data.Word import Data.Function
...
-
1 2 3 4 5 6
main contar:: (Ord t)=> t -> [t] -> Int contar _ [] = 0 contar a (x:xs) | (a == x) = (1 + (contar a xs)) | otherwise= contar a xs
-
1 2 3 4 5
contar:: (Ord t)=> t -> [t] -> Int contar _ [] = 0 contar a (x:xs) | (a == x) = (1 + (contar a xs)) | otherwise= contar a xs
-
1 2 3 4 5 6 7 8
main = do contar:: (Ord t)=> t -> [t] -> Int contar _ [] = 0 contar a (x:xs) | (a == x) = (1 + (contar a xs)) | otherwise= contar a xs


