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
let rec reverse l = match l with [] -> [] | h::t -> ((reverse t) @ [h]) ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] | h::t -> ((reverse t) @ [h]) ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] | h::t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] | h::t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] | h::t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] h::t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] h:t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] h:t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8
let rec reverse l = match l with [] -> [] h:t -> (reverse t) :: h ;;
...
-
1 2 3 4 5 6 7 8 9
let size l = let rec counter l pos = match l with [] -> pos | h::t -> counter t (pos+1) in counter l 0 ;;
...
-
1 2 3 4 5 6 7 8 9
let size l = let rec counter l pos = match l with [] -> pos | h::t -> counter t (pos+1) in counter l 0 ;;
...
-
1 2 3 4 5 6 7 8 9
let get_kth l k = List.nth l k;; let rec get_kth_2 l k = match l with [] -> "err" | h::t -> if k=0 then h else get_kth_2 t (k-1) ;; (** test **)
...
-
1 2 3 4 5 6 7 8 9
let get_kth l k = List.nth l k;; let rec get_kth_2 l k = match l with [] -> "err" | h::t -> if k=0 then h else get_kth_2 t (k-1) ;; (** test **)
...
-
1 2 3 4 5 6 7 8 9
let get_kth l k = List.nth l k;; let rec get_kth_2 l k = match l with [] -> "err" | h::t -> if k=0 then h else get_kth_2 t (k-1) ;; (** test **)
...
-
1 2 3 4 5 6 7 8 9
let get_kth k = List.nth l k;; let rec get_kth_2 l k = match l with [] -> "err" | h::t -> if k=0 then h else get_kth_2 t (k-1) ;; (** test **)
...
-
1 2 3 4 5 6 7 8 9
exception Short_list;; let my_last l = ( List.nth l ((List.length l) -2 ) );; let rec my_last_2 l = match l with [] -> raise Short_list | h::[] -> raise Short_list | h::h2::[] -> h
...
-
1 2 3 4 5 6 7 8 9
exception Short_list;; let my_last l = ( List.nth l ((List.length l) -2 ) );; let rec my_last_2 l = match l with [] -> raise Short_list | h::[] -> raise Short_list | h::h2::[] -> h
...
-
1 2 3 4 5 6 7 8 9
exception Short_list;; let my_last l = ( List.nth l ((List.length l) -2 ) );; let rec my_last_2 l = match l with [] -> raise Short_list | h::[] -> raise Short_list | h::h2::[] -> h;
...
-
1 2 3 4 5 6 7 8 9
exception Short_list;; let my_last l = ( List.nth l ((List.length l) -2 ) );; let rec my_last_2 l = match l with [] -> raise Short_list | h::[] -> raise Short_list | h:h2:[] -> h;
...
-
1 2 3 4 5 6 7 8 9
exception Empty_list;; let my_last l = ( List.nth l ((List.length l) -1 ) );; let rec my_last_2 l = match l with [] -> raise Empty_list | h::[] -> h | h::t -> my_last_2 t
...
-
1 2 3 4 5 6 7 8 9
exception Empty_list;; let my_last l = ( List.nth l ((List.length l) -1 ) );; let rec my_last_2 l = match l with [] -> raise Empty_list | h::[] -> h | h::t -> my_last_2 t
...
-
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 5 6 7 8
let rec multtab x y = let rec line y = if y = 0 then [] else line (y-1) @ [x*y]; in if x = 0 then [] else multtab (x-1) y @ [line y];; multtab 10 10;;
-
1
-
1 2 3 4 5 6 7 8 9
let isPrime n = let rec noDivisors m = m * m > n || (n mod m != 0 && noDivisors (m + 1)) in n >= 2 && noDivisors 2 ;; let is = isPrime 8 in
...
-
1 2 3 4 5 6 7 8 9
let isPrime n = let rec noDivisors m = m * m > n || (n mod m != 0 && noDivisors (m + 1)) in n >= 2 && noDivisors 2 ;; let is = isPrime 7 in
...
-
1 2 3 4 5 6 7 8
let isPrime n = let rec noDivisors m = m * m > n || (n mod m != 0 && noDivisors (m + 1)) in n >= 2 && noDivisors 2 ;; print_boolean isPrime 7;;
-
1 2 3 4 5 6 7 8
let isPrime n = let rec noDivisors m = m * m > n || (n mod m != 0 && noDivisors (m + 1)) in n >= 2 && noDivisors 2 ;; print_bool isPrime 7;;
-
1 2 3 4 5 6 7 8
let isPrime n = let rec noDivisors m = m * m > n || (n mod m != 0 && noDivisors (m + 1)) in n >= 2 && noDivisors ;; print_bool isPrime 7;;
-
1


