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
(defn fib [n] (let [gen-fib (fn [xs] (conj xs (apply + (take 2 (reverse xs))))) fib-list (iterate gen-fib [1 1])] (last (take (dec n) fib-list)))) (println (fib 6))
-
1 2 3 4 5 6
(defn fib [n] (let [gen-fib (fn [xs] (conj xs (apply + (take 2 (reverse xs))))) fib-list (iterate gen-fib [1 1])] (last (take (dec n) fib-list)))) (fib 6)
-
1 2 3 4 5 6 7 8 9
// program 24.cpp : Defines the entry point for the console application. // #include <iostream> #include <cstdlib> #include <time.h> #include <iomanip> using namespace std;
...
-
1 2 3 4 5 6 7 8 9
(defn bottles [n & [capitalize]] (str (if (> n 0) n (if capitalize "No more" "no more")) " bottle" (if (= 1 n) "" "s") " of beer" )) (defn bot-wall [n & cap] (str (bottles n cap) " on the wall")) (defn sing ; Default is 99 times. ([] (sing 99))
...
-
1 2 3 4 5 6 7 8
(def valtab { 1000 "M" 900 "CM" 500 "D" 400 "CD" 100 "C" 90 "XC" 50 "L" 40 "XL" 10 "X" 9 "IX" 5 "V" 4 "IV" 1 "I" }) (println valtab) (def lookup (sort > (map first valtab))) (println lookup)
...
-
1 2 3 4 5 6 7 8
(def valtab { 1000 "M" 900 "CM" 500 "D" 400 "CD" 100 "C" 90 "XC" 50 "L" 40 "XL" 10 "X" 9 "IX" 5 "V" 4 "IV" 1 "I" }) (println valtab) (def lookup (sort > (map first valtab))) (println lookup)
...
-
1 2
(defn format-lic [lic] (apply str (drop-last (interleave (map #(apply str %1) (partition 5 lic)) "---- ")))) (println (format-lic "ABCSADDSKJKJKJKJKJKJKJKJHGGGFGG"))
-
1 2
(defn format-lic [lic] (apply str (drop-last (interleave (map #(apply str %1) (partition 5 lic)) "---- ")))) (println (format-lic "ABCDEFGHIJKLMNOPQRSTUVWXY"))
-
1 2 3 4
(defn problem-fifty-two[] (some #(not (= 1 (count (set (map (comp sort str (partial * %)) [2 3 4 5 6]))))) (iterate inc 1))) (println (problem-fifty-two))
-
1 2 3 4
(defn problem-fifty-two[] (find #(not (= 1 (count (set (map (comp sort str (partial * %)) [2 3 4 5 6]))))) (iterate inc 1))) (println (problem-fifty-two))
-
1 2 3 4
(defn problem-fifty-two[] (take 1 (drop-while #(not (= 1 (count (set (map (comp sort str (partial * %)) [2 3 4 5 6]))))) (iterate inc 1)))) (println (problem-fifty-two))
-
1 2 3 4
(defn problem-fifty-two[] (time (take 1 (drop-while #(not (= 1 (count (set (map (comp sort str (partial * %)) [2 3 4 5 6]))))) (iterate inc 1))))) (println (problem-fifty-two))
-
1
000000002000000000220
-
1
(println (clojure-version))
-
1
(clojure-version)
-
1
(println "test")
-
1 2 3 4 5 6 7 8 9
(defn bottles [n & [capitalize]] (str (if (> n 0) n (if capitalize "No more" "no more")) " bottle" (if (= 1 n) "" "s") " of beer" )) (defn bot-wall [n & cap] (str (bottles n cap) " on the wall")) (defn sing ; Default is 99 times. ([] (sing 99))
...
-
1 2 3 4 5 6 7 8 9
(defn bottles [n & [capitalize]] (str (if (> n 0) n (if capitalize "No more" "no more")) " bottle" (if (= 1 n) "" "s") " of beer" )) (defn bot-wall [n & cap] (str (bottles n cap) " on the wall")) (defn sing ; Default is 99 times. ([] (sing 99))
...
-
1 2 3 4 5 6 7 8 9
(defn bottles [n & [capitalize]] (str (if (> n 0) n (if capitalize "No more" "no more")) " bottle" (if (= 1 n) "" "s") " of beer" )) (defn bot-wall [n & cap] (str (bottles n cap) " on the wall")) (defn sing ; Default is 99 times. ([] (sing 99))
...
-
1 2 3 4 5 6 7 8 9
...
-
1 2 3 4 5 6 7 8 9
(defn bottles [n & [capitalize]] (str (if (> n 0) n (if capitalize "No more" "no more")) " bottle" (if (= 1 n) "" "s") " of beer" )) (defn bot-wall [n & cap] (str (bottles n cap) " on the wall")) (defn sing ; Default is 99 times. ([] (sing 99))
...
-
1 2 3 4 5 6 7 8 9
.data x: .long 0 s: .string "%d\n\0" .text .global main main: # int main()
...
-
1 2 3 4 5 6 7 8 9
(defn bottles [n & [capitalize]] (str (if (> n 0) n (if capitalize "No more" "no more")) " bottle" (if (= 1 n) "" "s") " of beer" )) (defn bot-wall [n & cap] (str (bottles n cap) " on the wall")) (defn sing ; Default is 99 times. ([] (sing 99))
...
-
1
(print (+ 8 8))
-
1
(+ 8 8)
-
1
(+ 8 8)
-
1 2 3 4 5 6
(defn my-map [f c] (lazy-seq (when-not (empty? c) (cons (f (first c)) (my-map f (rest c)))))) (println (my-map inc (range 10)))
-
1 2 3 4 5
(#(lazy-seq (loop [r '() c (seq %2)] (if (empty? c) r (recur (conj r (% (first c))) (rest c))))) inc [1 2 3])
-
1 2 3 4 5
(#(lazy-seq (loop [r '() c (seq %2)] (if (empty? c) r (recur (conj r (% (first c))) (rest c))))) inc [1 2 3])
-
1 2 3 4 5 6 7 8 9
(defn random-letters [limit iteration] (println (format "iteration: %s" iteration)) (println (format "limit: %s" limit)) (def alphabet "abcdefghijklmnopqrstuvwxyz") (doseq [i (range limit)] (def m (mod i iteration)) (if (= 0 m) (println (format "i: %s" (get alphabet (rand-int 26)) )) ))
...


