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
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4 5 6 7 8 9
;; This function takes a non-negative integer and returns an integer. (defun f (x) (cond ((atom x) (f (list x 1 0))) (t (let ((n (car x)) (a (cadr x)) (b (caddr x))) (cond ((<= n 0) b) (t (f (list (- n 1) b (+ a b))))))))) ;; User interface
...
-
1 2 3 4
(loop for line = (read-line *standard-input* nil nil) while (not (equal line "42")) do (format t "~A~%" line))
-
1 2 3 4
(loop for line = (read-line *standard-input* nil nil) while (not (equal line "42")) do (format t "~A~%" line))
-
1
(eq 'foo 'Foo)
-
1
(+ 7 8 9)
-
1 2 3 4 5 6 7 8 9
begin 644 webutils_pl M8F5G:6X@-C0T(&EN9F\R+FAT;6P-"DTO(UU8.S900#U&-5(\5D5/.T-40BPR M6%`H0F!?+T)@0")#4$$Q)%TC-25%,#$R(4@])E5,*"4A-3!$42D-"DTP4F!" M*S)<3S53+2,K4ETD-20P0#8D030S-%!`+#)84"@E,5(X-EE3.C<Q23M664$[ M(EQ/,3180B)"8$(-"DTZ)S%4/"-(3RM7/5<]4EE7+%)93SQ&/$\U)2A//B9! M5#LV4%$K5#$T,2)=6#HG,4T[(R1-/2<I03M'+4D-"DT])D5/.T8E3"M&,50Y M(BA>(D!(0"@B8"DH8$1`(D)@0"A@1$`H8$0I(C!(7#HG,4T[(B%8.S913CQ3 M5$(-"DTZ)S%4/"-(3RM7/5<]4EE7+%)93SQ&/$\L,T19+C)=6#HG,4T[(BA> M+R9!13@V,%XH(F!`(C!$*2@B8"D-"DTB0U%4.C<Q3#DS62<Y-EU#.#8M2#DR
...
-
1 2 3 4 5 6 7 8
(declaim (optimize (speed 3)(safety 0))) (defun fac (n) (labels ((%fac (n acc) (if (<= n 1) acc (%fac (1- n) (* n acc))))) (%fac n 1))) (print (fac (parse-integer (read-line))))
-
1 2 3 4 5 6
(defun fac (n) (labels ((%fac (n acc) (if (<= n 1) acc (%fac (1- n) (* n acc))))) (%fac n 1))) (print (fac (parse-integer (read-line))))
-
1 2 3 4 5 6
(defun fac (n) (labels ((%fac (n acc) (if (<= n 1) acc (%fac (1- n) (* n acc))))) (%fac n 1))) (print (fac (parse-integer (read-line))))
-
1 2 3 4 5 6 7 8 9
;;Solution to facebook hacker cup Billboard brain teaser. ;;author: sea <http://sea4ever.users.sourceforge.net> ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
...
-
1
(+ 2 9)
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4 5 6 7 8 9
(defun generate-products (n product m k a b c d &optional (accum nil)) (if (= n 0) accum (generate-products (- n 1) (list (+ (mod (+ (* a (first product)) B) M) 1) (+ (mod (+ (* c (second product)) D) K) 1)) m k a b c d (cons product accum))))
...
-
1 2 3 4
(loop for line = (read-line *standard-input* nil nil) while (not (equal line "42")) do (format t "~A~%" line))
-
17 days 21 hours ago view (lines: 83, size: 3637, inputs: 1) Common Lisp (clisp) Success prattsishunk
1 2 3 4 5 6 7 8 9
(defun n-words-with-width-less-than (words fontsize length &optional (accum nil)) "The first N words with a combined fontwidth (including spaces) less than the width required." (if (<= (* fontsize (+ (length accum) ;;Add the spaces. -1 ;;Minus one, since the last word needs no space after it. (apply #'+ (mapcar #'length accum))));;Total width of the words length) (if (null words) accum (n-words-with-width-less-than (cdr words) fontsize length (cons (car words) accum)))
...


