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
#include <iostream> using namespace std; void changevar(int *x); int main() { int x = 3; int *px = &x;
...
-
1 2 3 4 5 6 7 8 9
#include <iostream> using namespace std; void changevar(int *x); int main() { int x = 3; int *px = &x;
...
-
1 2 3 4 5 6 7 8 9
let rec a k x1 x2 x3 x4 x5 = if k <= 0 then x4 () + x5 () else let m = ref k in let rec b () = decr m; a !m b x1 x2 x3 x4 in
...
-
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
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
let f x = List.exists (fun y -> x=y) (List.map (fun i -> 1 lsl i) [1;2;3;4;5;6;7;8;9;10]) in let g b = if f b then print_endline "YES" else print_endline "NO" in g 2; g 3; g 4; g 5;;
-
1 2 3 4 5
let f x = List.exists (fun y -> x=y) (List.map (fun i -> 1 lsl i) [1;2;3;4;5;6;7;8;9]) in let g b = if f b then print_endline "YES" else print_endline "NO" in g 2; g 3; g 5;;
-
1 2 3 4 5
let f x = List.exists (fun y -> x=y) (List.map (fun i -> 1 lsl i) [1;2;3;4;5;6;7;8;9]) in let when b = if f b then print_endline "YES" else print_endline "NO" in when 2; when 3; when 5;;
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | x::_ as y | _::x::_ as y -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y) | (_::x::_ as y) -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | ((x::_ as y) when x = 0) | ((_::x::_ as y) when x = 0) -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y) when x = 0 | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y) | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y)(* when x = 0 -> List.length y *) | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y) when x = 0 -> List.length y | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y) | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | x::_ as y | _::x::_ as y when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::_ as y) when x = 0 | _::x::_ as y when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | x::_ as y when x = 0 | _::x::_ as y when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::xs as y) | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | (x::xs as y) when x = 0 | (_::x::_ as y) when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | x::xs as y | _::x::_ as y when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | x::xs as y when x = 0 | _::x::_ as y when x = 0 -> List.length y | _ -> -1 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6 7 8 9
let f x = match x with | [] -> 0 | x::xs as y when x = 0 -> List.length y | _::x::_ as y when x = 0 -> List.length y * 10 | _ -> 2 in print_endline (string_of_int (f [])); print_endline (string_of_int (f [0;3])); print_endline (string_of_int (f [1;0;3]));
...
-
1 2 3 4 5 6
let f x = match x with | [] -> 0 | x::xs as y when x = 0 -> List.length y | _ -> 2 in f [2;3];;
-
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
4.3 -. 1.2;;
-
1 2 3 4 5 6 7 8 9
int lim = 0x12345678; int pp = 256; for (int i = 1; (lim-pp) / ((64 + i) + pp) != 0; i++) { if (atan(i - ((i / lim) * lim)) > 1.55) // > ~50 lim = (lim / 50) * 40; int foo = lim; // bar for (int j = 0; j < 0x123456; j++) foo ^= (j >> 3) | (j << 29); // tidy pp &= foo; // in 42-0 if (lim - ((lim / i) * i) == 0) {
...
-
1 2 3 4
procedure main () while (l := read()) ~= 42 do write(l); end
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] | h::t -> ((reverse t) @ [h]) ;;
...


