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
let rec nwd a b = if b <> 0 then nwd b (a mod b) else a;; print_int (nwd 5 6);;
-
1 2 3 4
let rec nwd a b = if b <> 0 then nwd b (a mod b) else a;; nwd 5 6;;
-
1 2 3 4 5 6 7 8 9
let rec nwd a b = if b <> 0 then nwd b (a mod b) else a;; let n = read_int();; let rec f x = if x > 0 then let m = read_int() in let d = read_int() in print_int (nwd m d)
...
-
1 2 3 4 5 6 7 8 9
let rec nwd a b = if b <> 0 then nwd b (a mod b) else a;; nwd 1029 1071;; nwd 5 10;; nwd 11 7;; let n = read_int();;
...
-
1 2
let n = read_int();; print_int n;;
-
1 2 3
let rec nwd a b = if b <> 0 then nwd b (a mod b) else a;;
-
1 2 3 4 5 6 7 8 9
let sb = Scanf.Scanning.stdib in let next_int () = Scanf.bscanf sb " %d" (fun s -> s) in let next_string () = Scanf.bscanf sb " %s" (fun s -> s) in let convert (s:string) :Big_int.big_int = let a = ref Big_int.zero_big_int in for i = 0 to 63 do match s.[63-i] with | 'R' -> a := Big_int.add_big_int !a (Big_int.shift_left_big_int Big_int.unit_big_int i) done
...
-
1 2 3 4 5 6 7 8
while true do let n = read_int () in if n = 42 then exit 0; print_int n; print_newline () done;;
-
1 2 3 4 5 6 7 8 9
valid([]). valid([Head|Tail]) :- fd_all_different(Head), valid(Tail). sudoku4(Puzzle, Solution) :- Solution = Puzzle, Puzzle = [S11, S12, S13, S14,
...
-
1 2 3 4 5 6 7 8 9
let deduct_10000_if_possible x = if (x >= 10000) then (x - 10000) else x;; let rec numsubstrings str1 str2 l i j = if (j == (String.length str2)) then 1 else if (i == (String.length str1)) then 0 else if ((String.get str1 i) != (String.get str2 j)) then numsubstrings str1 str2 l (i+1) j
...
-
1 2 3
let add a b = a + b Printf.printf "%d\n" (add 1 2)
-
1 2 3 4 5 6 7 8 9
xb1lIHRvIG5lYnlsbyB0xJvFvmvDqT8gSmVuIHBybyDDunBsbm9zdCBwcm8gbm9ybcOhbG7DrSAo dGVkeSBuZXBvxI3DrXRhxI1vdsO9KSAgbGlkIC0gcHJvxI0gUG/FoXRvdm7DrT8gIEvDs2QgQmFz ZTY0LCBrdGVyw71tIGplIHRlbmhsZSB0ZXh0IHpha8OzZG92w6FuLCBwb3XFvsOtdsOhdGUgbWou ICAoYW5pxb4gdG8gdMWZZWJhIHbDrXRlKSB2ZSB2xaFlY2ggdmHFoWljaCBlbWFpbG92w71jaCB6 cHLDoXbDoWNoIGsgdG9tdSwgYWJ5IHNlIGsgdsOhbSBuZWJvIG9kIHbDoXMgZG9ixZllIHDFmWVu ZXNseSB2xaFlY2hueSBWYcWhZSBmb3RreSwgdmlkZWEsIHRleHR5IHMgxI1lc2tvdSBkaWFrcml0 aWtvdSBhIGppbsOpIHZ5Y2h5dMOhdmt5IChvYmVjbsOhIGJpbsOhcm7DrSBkYXRhIHNlIGvDs2R1 asOtIHBvIDYgYml0ZWNoIGRvIHRpc2tudXRlbG7DvWNoIDY0IHpuYWvFrywga3RlcsOpIGpzb3Ug cMWZZW5vc2l0ZWxuw6EgcG/FoXRvdm7DrW0gIE1JTUUgcHJvdG9rb2xlbSkuIFRha8W+ZSAgdGFr
...
-
1 2 3
S = 0 [i $ 1 .. Inf] S += (-1) ^ (i - 1) * i print S
-
1 2 3 4 5 6
while true do let n = read_int () in if n = 42 then exit 0; print_int n; print_newline () done;;
-
1 2 3 4
module type S = sig .. end module Make: functor (B : Builder.INT) -> S with type graph = B.G.t and type vertex = B.G.V.t and type edge_label = B.G.E.label
-
1 2 3 4 5
let x = ["A","B"];; take(l) = match l with x -> true;; take(x);;
-
1 2 3 4 5
let x = ["A","B"]; take(l) = match l with x -> true; take(x);
-
1 2 3
let x = ["A","B"];;
-
1 2 3
let x = [A,B,C,D,E,F,G];;
-
1 2 3
let x = 3+4;;
-
1 2 3
?- write('Hello world!'), nl.
-
1 2 3 4 5 6
while true do let n = read_int () in if n = 42 then exit 0; print_int n; print_newline () done;;
-
1 2 3 4 5 6 7
let myfunction w x y z = [w ; x] :: [y; z] ;; type mytype = int*int*int;; type mytype2 = int*int*int;; print_string "hellow world";; print_int ((1,2)[0]);;
-
1 2 3 4 5 6 7
let myfunction w x y z = [w ; x] :: [y; z] ;; type mytype = int*int*int;; type mytype2 = int*int*int;; print_string "hellow world";; print (3, 2);;
-
1 2 3 4 5
let x = (2, "hi") let func x = match x with (y,z) -> y func x
-
1 2 3
let x = (2, "hi") let func x = match x with (y,z) -> y
-
1 2 3 4 5 6
let myfunction w x y z = [w ; x] :: [y; z] ;; type mytype = int*int*int;; type mytype2 = int*int*int;; print_string "hellow world"
-
1 2 3 4 5
let myfunction w x y z = [w ; x] :: [y; z] ;; type mytype = int*int*int;; print_string "hellow world"
-
1 2 3 4 5
let myfunction w x y z = [w ; x] :: [y; z] ;; type mytype = int*int*int print_string "hellow world"
-
1 2 3 4 5
let myfunction w x y z = [w ; x] :: [y; z] ;; print_string "hellow world"


