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 9
import Data.List main = do name1 <- getLine name2 <- getLine putStr $ show $ flames name1 name2 flames :: [Char] -> [Char] -> Char flames name1 name2 = flames' count where
...
-
1 2 3
fibs = 0 : 1 : zipWith (+) fibs (tail fibs) main = print $ fibs !! 10
-
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
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
import Data.List main = do name1 <- getLine name2 <- getLine putStr $ show $ flames name1 name2 flames :: [Char] -> [Char] -> Char flames name1 name2 = flames' count where
...
-
1 2 3 4 5 6 7 8 9
import Data.List main = do name1 <- getLine name2 <- getLine putStr $ show $ flames name1 name2 flames :: [Char] -> [Char] -> Char flames name1 name2 = flames' count where
...
-
1 2 3 4 5 6 7 8 9
import Data.List main = do name1 <- getLine name2 <- getLine putStr $ show $ flames name1 name2 flames :: [Char] -> [Char] -> Char flames name1 name2 = flames' count where
...
-
1 2 3 4 5 6 7 8 9
import Data.List main = do name1 <- getLine name2 <- getLine putStr $ show $ flames name1 name2 flames :: [Char] -> [Char] -> Char flames name1 name2 = flames' count where
...
-
1
head [1,2,3,4]
-
1 2 3 4 5 6 7 8 9
import Control.Arrow cross ((ax, ay), (bx, by), (cx, cy)) = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) groupInPairs (a:b:xs) = scanl (curry $ first snd) (a, b) xs triangulate = uncurry (map . (uncurry . (,,))) . (head &&& groupInPairs . tail) task = (/ 2) . sum . map (abs . cross) . triangulate
-
1 2 3 4 5 6 7 8
import Control.Arrow cross ((ax, ay), (bx, by), (cx, cy)) = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) groupInPairs (a:b:xs) = scanl (curry $ first snd) (a, b) xs triangulate = uncurry (map . (uncurry . (,,))) . (head &&& groupInPairs . tail) task = (/ 2) . sum . map (abs . cross) . triangulate
...
-
1 2 3 4 5 6 7 8
import Control.Arrow cross ((ax, ay), (bx, by), (cx, cy)) = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) groupInPairs (a:b:xs) = scanl (curry $ first snd) (a, b) xs triangulate = uncurry (map . (uncurry . (,,))) . (head &&& groupInPairs . tail) task = (/ 2) . sum . map (abs . cross) . triangulate
...
-
1 2 3 4 5 6 7 8
import Control.Arrow cross ((ax, ay), (bx, by), (cx, cy)) = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) groupInPairs (a:b:xs) = scanl (curry $ first snd) (a, b) xs triangulate = uncurry (map . (uncurry . (,,))) . (head &&& groupInPairs . tail) task = (/ 2) . sum . map (abs . cross) . triangulate
...
-
1 2 3 4 5 6 7 8
import Control.Arrow cross ((ax, ay), (bx, by), (cx, cy)) = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) groupInPairs (a:b:xs) = scanl (curry $ first snd) (a, b) xs triangulate = uncurry (map . (uncurry . (,,))) $ (head &&& groupInPairs . tail) task = (/ 2) . sum . map (abs . cross) . triangulate
...
-
1 2 3 4 5 6 7 8
import Control.Arrow cross ((ax, ay), (bx, by), (cx, cy)) = (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) groupInPairs (a:b:xs) = scanl (curry $ first snd) (a, b) xs triangulate = uncurry (map . (uncurry . (,,))) $ (head &&& groupInPairs . tail) task = (\ 2) . sum . map (abs . cross) . triangulate
...
-
1 2 3 4
import Control.Arrow sub = uncurry (***) . ((-) *** (-)) tov = uncurry (***) . (sub *** sub) main = print $ tov (6, 7) ((1, 2), (3, 4))
-
1 2 3 4
import Control.Arrow sub = uncurry (***) . ((-) *** (-)) tov = uncurry (***) . (sub *** sub) main = print $ sub (1, 2) (3, 4)
-
1 2 3 4
import Control.Arrow sub = uncurry (***) . ((-) *** (-)) tov = uncurry (***) . (sub *** sub) main = print $ tov (2, 5) ((1, 2), (3, 4))
-
1 2 3
import Control.Arrow tov = uncurry (***) . (sub *** sub) main = print $ det ((1, 2), (3, 4))
-
1 2
det = uncurry (-) . uncurry (uncurry (***) . ((*) *** (*))) . second swap main = print $ det ((1, 2), (3, 4))
-
1 2
main = print this where this = 0
-
1 2
main = this where this = 0
-
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
instance Num (,) where (a, b) - (c, d) = (a - c, b - d) main = print $ (1, 2) - (2, 3)
-
1 2
doubleSquare (ax, ay) (bx, by) (cx, cy) = abs $ (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) main = print $ doubleSquare (4,-4) (8,2) (3,8)
-
1 2 3
import Control.Arrow triangulate (x:a:b:xs) = scanl (curry $ first snd) (a, b) xs main = print $ triangulate $ [1, 2, 3, 4, 5]
-
1 2 3
import Control.Arrow triangulate (x:a:b:xs) = scanl (curry (snd *** id)) (a, b) xs main = print $ triangulate $ [1, 2, 3, 4, 5]
-
1 2
triangulate (x:a:b:xs) = scanl (curry (snd *** id)) (a, b) xs main = print $ triangulate $ [1, 2, 3, 4, 5]
-
1
main = print $ (1, 2) + (2, 3)
-
1 2
triangulate (x:a:b:xs) = scanl (\(x, a, b) n -> (x, b, n)) (x, a, b) xs main = print $ triangulate $ [1, 2, 3, 4, 5, 6, 7]


