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
J=zip [1] [2]
-
1 2 3 4 5 6 7 8
import Data.List import qualified Data.ByteString.Char8 as BS convertBase :: Integer -> [Integer] convertBase 0 = [] convertBase n = (mod n 5) : convertBase ( div n 5 )
...
-
1 2 3 4 5 6 7 8 9
Data Tree a = Empty | Node a (Tree a) (Tree a) menoresMaiores :: Float -> Tree Float -> ([Float],[Float]) menoresMaiores _ Empty = ([],[]) menoresMaiores n (Node x esq dir) | x < n = (x:(a1 ++ b1), a2 ++ b2) | otherwise = (a1 ++ b1, x:(a2 ++ b2)) where (a1,a2) = menoresMaiores n esq
-
1 2 3 4 5 6 7 8
menoresMaiores :: Float -> Tree Float -> ([Float],[Float]) menoresMaiores _ Empty = ([],[]) menoresMaiores n (Node x esq dir) | x < n = (x:(a1 ++ b1), a2 ++ b2) | otherwise = (a1 ++ b1, x:(a2 ++ b2)) where (a1,a2) = menoresMaiores n esq (b1,b2) = menoresMaiores n dir
-
1 2 3 4 5 6 7
menoresMaiores :: Float -> Tree Float -> ([Float],[Float]) menoresMaiores _ Empty = ([],[]) menoresMaiores n (Node x esq dir) | x < n = (x:(a1 ++ b1), a2 ++ b2) | otherwise = (a1 ++ b1, x:(a2 ++ b2)) where (a1,a2) = menoresMaiores n esq (b1,b2) = menoresMaiores n dir
-
1 2 3 4 5 6 7
menoresMaiores :: Float -> Tree Float -> ([Float],[Float]) menoresMaiores _ Empty = ([],[]) menoresMaiores n (Node x esq dir) | x < n = (x:(a1 ++ b1), a2 ++ b2) | otherwise = (a1 ++ b1), x:(a2 ++ b2)) where (a1,a2) = menoresMaiores n esq (b1,b2) = menoresMaiores n dir
-
1 2 3 4
func::(a->a)->(a->a)->Int->(a->a) func f g n |n==1 =f |otherwise = + g func g f (n-1)
-
1 2 3 4
null::[a]->Bool null (x:xs) | x==[] =True | otherwise False
-
1 2 3 4
null::[a]->Bool null (x:xs) | [x:xs]==[] =True | otherwise False
-
1 2 3 4
null::[a]->Bool null (x:xs) | [x:xs]==[] True | otherwise False
-
1 2 3 4
null::[a]->Bool null (x:xs) | [x:xs]==[] true | otherwise false
-
1 2 3 4
null::[a]->Bool null [x:xs] | [x:xs]==[] false | otherwise true
-
1 2 3 4
null ::[a]->Bool null b = | a==[] True | otherwise false
-
1
main = print (2^100)
-
1 2
f(a)=(3*a-1) f(1)
-
1 2 3 4 5 6 7 8 9
import Control.Monad import Control.Monad.Instances -- Project Euler Problem #55 next :: Integer -> Integer next = (read . reverse . show) >>= (+) isPal :: Integer -> Bool
...
-
1 2 3 4 5 6 7 8 9
import Control.Monad import Control.Monad.Instances -- Project Euler Problem #55 next :: Integer -> Integer next = (read . reverse . show) >>= (+) isPal :: Integer -> Bool
...
-
1 2 3 4 5 6 7 8 9
import Control.Monad import Control.Monad.Instances -- Project Euler Problem #55 next :: Integer -> Integer next = (read . reverse . show) >>= (+) isPal :: Integer -> Bool
...
-
1 2 3 4 5 6 7 8 9
import Control.Monad import Control.Monad.Instances -- Project Euler Problem #55 next :: Integer -> Integer next = (read . reverse . show) >>= (+) isPal :: Integer -> Bool
...
-
1 2 3 4 5 6 7 8 9
import Control.Monad import Control.Monad.Instances -- Project Euler Problem #55 next :: Integer -> Integer next = (read . reverse . show) >>= (+) isPal :: Integer -> Integer
...
-
1
main= print("42")
-
1
main= do putStrLn "42"
-
1 2 3 4 5 6 7 8 9
import Data.List import Control.Monad import Data.Ord (comparing) solve [] [x] = [x] solve ns stack = pushes ++ ops where pushes = do
...
-
1 2 3 4 5 6 7 8 9
module AStack( Stack, push, pop, top, size ) where data Stack a = Empty | MkStack a (Stack a) push :: a -> Stack a -> Stack a push x s = MkStack x s size :: Stack a -> Int size s = length (stkToLst s) where stkToLst Empty = [] stkToLst (MkStack x s) = x:xs where xs = stkToLst s
...
-
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 4 5 6 7 8
import Data.List import qualified Data.ByteString.Char8 as BS convertBase :: Integer -> [Integer] convertBase 0 = [] convertBase n = (mod n 5) : convertBase ( div n 5 )
...
-
1 2 3 4 5 6 7 8
import Data.List import qualified Data.ByteString.Char8 as BS convertBase :: Integer -> [Integer] convertBase 0 = [] convertBase n = (mod n 5) : convertBase ( div n 5 )
...
-
1 2 3 4 5 6 7 8
import Data.List import qualified Data.ByteString.Char8 as BS convertBase :: Integer -> [Integer] convertBase 0 = [] convertBase n = (mod n 5) : convertBase ( div n 5 )
...
-
1 2 3 4 5 6 7 8
import Data.List import qualified Data.ByteString.Char8 as BS convertBase :: Integer -> [Integer] convertBase 0 = [] convertBase n = (mod n 5) : convertBase ( div n 5 )
...


