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
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
-
1 2 3 4 5 6 7 8 9
let rec fibb n = if n = 1 then 1 else if n=2 then 1 else fibb(n-1)+fibb(n-2) ;; print_int fibb 5;;
-
1
-
1 2 3 4 5 6 7 8 9
let rec sumcube x = let cube x = x*x*x in if x=0 then 0 else cube x + sumcube (x-1) ;; print_int (sumcube 3);;
-
1 2 3 4 5 6 7 8 9
let rec sumcube x = let cube x = x*x*x in if x=0 then 0 else cube x + sumcube (cube (x-1)) ;; print_int (sumcube 3);;
-
1 2 3 4 5 6 7 8 9
let rec sumcube x = let cube x = x*x*x in if x=0 then 0 else cube x + sumcube cube (x-1) ;; print_int (sumcube 3);;
-
1 2 3 4 5 6 7 8 9
let rec sumcube x = let cube x = x*x*x in if x=0 then 0 else cube x + sumf cube (x-1) ;; print_int (sumcube 3);;
-
1 2 3 4 5 6 7 8
let rec sumf f x = if x=0 then 0 else f x + sumf f (x-1) ;; let cube x = x*x*x;; print_int (sumf cube 3);;
-
1 2 3 4 5 6 7 8
let rec sumf f x = if x=0 then 0 else f x + f (x-1) ;; let cube x = x*x*x;; print_int (sumf cube 3);;
-
1 2 3 4 5 6 7 8
let rec sumf f x = if x=0 then 0 else f x + f (x-1) ;; let cube x = x*x*x;; print_int (cube 3);;
-
1 2 3 4 5 6 7 8
let rec sumf f x = if x=0 then 0 else f x + f (x+1) ;; let cube x = x*x*x;; print_int cube 3;;
-
1 2 3 4 5 6 7 8
let rec sumf f x = if x=0 then 0 else f x + f (x+1) ;; let cube x = x*x*x;; cube 3 n;;
-
1 2 3 4 5 6 7 8 9
let rec sumf f x = if x=0 then 0 else f x + f (x+1) ;; let cube x = x*x*x;; cube 3
-
1 2 3 4 5 6 7 8 9
let rec sumf f x = if x=0 then 0 else f x + f (x+1) ;; let cube x = x*x*x;; cube 3;;
-
1 2 3 4 5 6 7 8 9
let rec sumf f x = if x=0 then 0 else f x + f (x+1) ;; let cube x = x*x*x;; cube 3;;
-
1 2 3 4 5 6 7 8 9
let rec sumf f x = if x=0 then 0 else f x + f (x+1) ;; let cube x = x*x*x;; sumf cube 3;;
-
1 2 3 4 5 6 7 8 9
let rec sumf f x = if x=0 then 0 else f x + f (x-1) ;; let cube x = x*x*x;; sumf cube 3;;
-
1 2 3 4 5 6 7 8 9
let rec sumf f x = if n=0 then 0 else f x + f (x-1) ;; let cube x = x*x*x;; sumf cube 3;;
-
1 2 3 4 5 6 7 8 9
let rec apply_fun_list x f_list = if f_list = [] then [] else ((List.hd f_list) x)::(apply_fun_list x (List.tl f_list)) ;; let mk_mult_fun_list n = let rec mmfl_aux p = if p = n then [ ( * ) n ] else (( * ) p) :: (mmfl_aux (p+1)) in (mmfl_aux 1) ;;
...
-
1 2 3 4 5 6 7 8 9
let rec apply_fun_list x f_list = if null f_list then [] else ((List.hd f_list) x)::(apply_fun_list x (List.tl f_list)) ;; let mk_mult_fun_list n = let rec mmfl_aux p = if p = n then [ ( * ) n ] else (( * ) p) :: (mmfl_aux (p+1)) in (mmfl_aux 1) ;;
...


