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
- Java7
- 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
let biApply f (a, b) = (f a, f b) let splitAt n list = let splitter ((xs, ys), n') c = if n' < n then ((c :: xs, ys), n' + 1) else ((xs, c :: ys), n' + 1) List.fold splitter (([], []), 0) list
...
-
1 2 3 4 5 6 7 8 9
let (***) f g = fun (a, b) -> (f a, g b) let biApply f = f *** f let splitAt n list = let splitter ((xs, ys), n') c = if n' < n then ((c :: xs, ys), n' + 1) else
...
-
1 2 3 4 5 6 7 8 9
let f *** g = fun (a, b) -> (f a, g b) let biApply f = f *** f let splitAt n list = let splitter ((xs, ys), n') c = if n' < n then ((c :: xs, ys), n' + 1) else
...
-
1 2 3 4 5 6 7 8 9
let (***) f g (a, b) = (f a, g b) let biApply f = f *** f let splitAt n list = let splitter ((xs, ys), n') c = if n' < n then ((c :: xs, ys), n' + 1) else
...
-
1 2 3 4 5 6 7 8 9
let biApply f (a, b) = (f a, f b) let splitAt n list = let splitter ((xs, ys), n') c = if n' < n then ((c :: xs, ys), n' + 1) else ((xs, c :: ys), n' + 1) List.fold splitter (([], []), 0) list
...
-
1 2 3 4 5 6 7 8 9
let splitAt n list = let splitter ((xs, ys), n') c = if n' < n then ((c :: xs, ys), n' + 1) else ((xs, c :: ys), n' + 1) List.fold splitter (([], []), 0) list |> fst |> (fun (xs, ys) -> (List.rev xs, List.rev ys))
...
-
1 2 3 4 5 6 7 8 9
let splitAt n list = List.fold (fun ((xs, ys), n') c -> if n' < n then ((c :: xs, ys), n' + 1) else ((xs, c :: ys), n' + 1) ) (([], []), 0) list |> fst |> (fun (xs, ys) -> (List.rev xs, List.rev ys)) printfn "%A" (splitAt 3 [2; 90; 1; 22])
-
1 2 3 4 5 6 7 8 9
let splitAt n list = List.fold (fun ((xs, ys), n') c -> if n' < n then ((c :: xs, ys), n' + 1) else ((xs, c :: ys), n' + 1) ) (([], []), 0) list |> fst printfn "%A" (splitAt 3 [2; 90; 1; 22])
-
1 2 3 4 5
let flip f a b = f b a let myFunc = flip String.replicate printfn "%s" (myFunc "hello" 3)
-
1 2 3 4 5
let flip f a b = f b a let myFunc = flip String.replicate printfn "%s" (myFunc 3 "hello")
-
1 2 3 4 5 6 7
(* Infinite sequence of whole numbers. 0 .. *) let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 (* Zips the given sequence with indices of elements. *) let zipWithIndex coll = Seq.zip coll indices printfn "%A" ([12; 8; 9; 90; 3; 24] |> zipWithIndex |> Seq.minBy fst) // meh
-
1 2 3 4 5 6 7
(* Infinite sequence of whole numbers. 0 .. *) let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 (* Zips the given sequence with indices of elements. *) let zipWithIndex coll = Seq.zip coll indices printfn "%A" ([12; 8; 9; 90; 3; 24] |> zipWithIndex |> Seq.minBy fst)
-
1 2 3 4
let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 let zipWithIndex coll = Seq.zip coll indices printfn "%A" ([12; 8; 9; 90; 3; 24] |> zipWithIndex |> Seq.minBy fst)
-
1 2 3 4 5
let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 let zipWithIndex coll = Seq.zip coll indices let x = [12; 8; 9; 90; 3; 24] |> zipWithIndex printfn "%A" (Seq.minBy fst x)
-
1 2 3 4 5
let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 let zipWithIndex coll = Seq.zip coll indices let x = [12; 8; 9; 90, 3; 24] |> zipWithIndex printfn "%A" (Seq.minBy fst x)
-
1 2 3 4 5
let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 let zipWithIndex coll = Seq.zip coll indices printfn "%A" ([12; 8; 9; 90, 3; 24] |> zipWithIndex |> Seq.minBy fst)
-
1 2 3 4 5
let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0 let zipWithIndex coll = Seq.zip coll indices printfn "%A" ([12; 8; 9; 90, 3; 24] |> zipWithIndex |> Seq.minBy fst)
-
1 2 3 4 5 6 7 8 9
module Seq = let zipWithIndex coll = Seq.zip coll ( seq { let i = ref 0 while true do let x = !i i := !i + 1 yield x }
...
-
1 2 3 4 5 6 7 8 9
let foo = Seq.zip [3; 4; 89] ( seq { let i = ref 0 while true do let x = !i i := !i + 1 yield x } )
...
-
1 2 3
let foo = Seq.zip [3; 4; 89] (seq { 0 .. }) printfn "%A" foo
-
1 2 3 4 5 6 7 8 9
open System [<EntryPoint>] let main (args: string[]) = if args.Length <> 2 then failwith "Error: " let greeting, thing = args.[0], args.[1] let timeOfDay = DateTime.Now.ToString("hh:mm tt") printfn "%s, %s at %s" greeting thing timeOfDay 0
-
1 2 3 4 5 6 7 8 9
open System [<EntryPoint>] let main (args: string[]) = if args.Length <> 2 then failwith "Error: " let greeting, thing = args.[0], args.[1] let timeOfDay = DateTime.Now.ToString("hh:mm tt") printfn "%s, %s at %s" greeting thing timeOfDay 0
-
1 2 3 4 5 6 7 8 9
open System [<EntryPoint>] let main (args: string[]) = if args.Length <> 2 then failwith "Error: " let greeting, thing = args.[0], args.[1] let timeOfDay = DateTime.Now.ToString("hh:mm tt") printfn "%s, %s at %s" greeting thing timeOfDay 0
-
1 2 3 4 5 6 7 8 9
f~^kn~+c+ia~^+~cf+?/ [f!c-ki~:~b/au>++*+k~~r~bn!*+i <kk]k/>rkbrn~!:?[->+uc*a+af~>^b+ub+k +i?:fn>+b+kb^+>kn?+ii/kb++u>?a+^+?+u>u?c+ i:+~/+>++:kba+~b?+:>+rr!b+k+++u?n<k!b**<i<c~i <!^<<<<krb~^/]>>-u~/*-:<ck^<++!!:n+!kcbinc[~kr-: *k:!kb?>c~>>*u!nnrbabi>+irn>i?+~+?>icc*+ci+i+!<<rb ^knnb<!<!i<b^r<i!^/]>f/>>a/?>i~>~>>>b--.r/rucffa!/<n <:u<?ua<cr<*:<i:bb<fu/nb.>b:r:*?**>n:!>::~/*+.>>r-:.:
...
-
1 2 3 4 5 6 7
open System let mutable num = System.Console.ReadLine() while not(System.String.Equals(num, "42", System.StringComparison.CurrentCultureIgnoreCase)) do System.Console.Write(num) num <- System.Console.ReadLine() System.Console.WriteLine()
-
1 2 3 4 5 6 7 8 9
# #### ##### #### ## ################# ## ############# ############# ####### ####### ###### ###### ### Spieglein ### ###### ###### ###### Spieglein ######
...
-
1 2 3 4 5 6 7 8 9
let ReverseString (s:string) = new string(Array.rev (s.ToCharArray())) let listOfReverseAndAdd2 = [ for i in 1..10000 do if System.Int64.Parse( (ReverseString (i.ToString()))) |> (+) (System.Int64.Parse(i.ToString())) |> isPalindrome //this requires a string but the above computation is returning integer. What to do? then
...
-
1 2 3 4 5 6 7 8 9
int*** allocate3D(int m, int n, int p) { int ***arr3D; int i, j, k; int value = 3; arr3D = new int**[x]; for(i=0; i < x; i++) {
...
-
1 2 3 4 5 6 7 8 9
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int*** allocate3D(int m, int n, int p) { int ***arr3D; int i, j, k;
...
-
1 2 3 4 5 6 7 8 9
let ReverseString (s:String) = new string(List.Reverse List.ofSeq s) Console.WriteLine(ReverseString "bhu") let isPalindrome str = match str with | String.rev str -> true


