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
triangulate (x:a:b:xs) = scanl (\(x, a, b) n -> (x, b, n)) xs (x, a, b) main = print $ triangulate $ [1, 2, 3, 4, 5, 6, 7]
-
1 2
triangulate (x:a:b:xs) = scanl ((x, a, b) n -> (x, b, n)) xs (x, a, b) main = print $ triangulate $ [1, 2, 3, 4, 5, 6, 7]
-
1
main = print $ (\(x:a:b:xs) -> scanl ((x, a, b) n -> (x, b, n)) xs (x, a, b)) $ [1, 2, 3, 4, 5, 6, 7]
-
1
main = print $ scanl1 (,) $ [2, 3, 4, 5, 6, 7]
-
1 2 3 4
range1 = [ 0, 2, 4, 6, 8 ]; range2 = [ 1, 3, 5, 7, 9 ]; main = print [a * b | a <- range1, b <- range2, a*b /= 0]
-
1 2 3 4
range1 = [ 0, 2, 4, 6, 8 ]; range2 = [ 1, 3, 5, 7, 9 ]; main = print [a * b | (a, b) <- zip range1 range2]
-
1
main = mapM_ print [1..10]
-
1 2
main = do putStr "Hello world."
-
1 2 3 4 5 6 7 8
import Data.List import Data.Char import Data.Maybe ( fromJust ) import qualified Data.IntMap as M import qualified Data.ByteString.Lazy.Char8 as BS byteSum :: BS.ByteString -> Integer byteSum s = BS.foldr ( \x y -> y + ( fromIntegral . digitToInt $ x ) ) 0 s
...
-
1 2 3 4 5 6 7 8
import Data.List import Data.Char import Data.Maybe ( fromJust ) import qualified Data.IntMap as M import qualified Data.ByteString.Lazy.Char8 as BS byteSum :: BS.ByteString -> Integer byteSum s = BS.foldr ( \x y -> y + ( fromIntegral . digitToInt $ x ) ) 0 s
...
-
1 2 3
range1 = [ 0, 2, 4, 6, 8 ]; main = print [a * b | a <- range1, b <- [0..a]]
-
1 2 3 4
range1 = [ 0, 2, 4, 6, 8 ]; range2 = [ 1, 3, 5, 7, 9 ]; main = print $ map (uncurry (*)) $ zip range1 range2
-
1 2 3 4
range1 = [ 0, 2, 4, 6, 8 ]; range2 = [ 1, 3, 5, 7, 9 ]; main = print [a * b | a <- range1, b <- range2]
-
1
main = print $ foldr (:) [] "abcd"
-
1
main = print $ foldl (:) [] "abcd"
-
1 2 3 4
fib :: Int -> Int fib 1 = 1 fib x = x * fib (x - 1) main = putStr $ show $ fib 3
-
1 2 3 4
fib :: Int -> Int fib 1 = 1 fib x = x * fib (x - 1) main = println $ show $ fib 3
-
1 2 3
fib :: Int -> Int fib 1 = 1 fib x = x * fib (x - 1)
-
1 2 3 4 5 6 7 8
{-# OPTIONS_GHC -Wall #-} toDigits :: Integer -> [Integer] toDigits a | a<=0 =[] |otherwise = reverse(toDigitsRev(a))
...
-
1 2 3 4 5 6 7 8 9
main = do nombre <- getLine nota1 <- readNum nota2 <- readNum promedio <- (nota1 + nota2)/2 if promedio > 60 putStr (nombre + "pasó") else do putStr (nombre + "no pasó")
...
-
1
main = print "Hello"
-
1 2 3 4 5 6 7 8
import Control.Arrow import Control.Monad import Control.Monad.Instances square = join (*) biApply = join (***) foo = ((uncurry (+) . biApply square) .) . (,)
-
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 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 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 9
<form action="/Enviar" method="get"> <fieldset> <label> <span>Nome</span>
...
-
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
fibs = 0 : 1 : zipWith (+) fibs (tail fibs) main = print $ fibs !! 10
-
1 2
main = do foldl ( \ a b -> 2*a + b) 0 [1,0,0,1,0]
-
1
foldl ( \ a b -> 2*a + b) 0 [1,0,0,1,0]


