Skip to content

Instantly share code, notes, and snippets.

View mourginakis's full-sized avatar
👻

Ioannis Mourginakis mourginakis

👻
View GitHub Profile
@mudphone
mudphone / Another-Clojure-Y-Combinator.clj
Created August 1, 2012 09:29
Another Clojure Y-Combinator
;; Y-Combinator in Clojure
;; based on: http://mvanier.livejournal.com/2897.html
;; This is the simple naive implementation.
(defn simple-factorial
"A simple, naive implementation of the factorial function."
[n]
(if (= n 0)
1
(* n (simple-factorial (dec n)))))
@michiakig
michiakig / ants.clj
Created July 19, 2011 22:37
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world