Skip to content

Instantly share code, notes, and snippets.

View jayunit100's full-sized avatar
🎯
Focusing

jay vyas jayunit100

🎯
Focusing
View GitHub Profile
@jayunit100
jayunit100 / PureGOL
Created October 21, 2012 23:21
A Pure implementation of the Game of Life.
(ns problems.life
(:require [clojure.string]));;should use "only" here! (use '[clojure.data.json :only (read-json json-str)])
;This function determines wether a cell is alive or dead.
;Its a simplified version of the classic life function.
; f: the initial board function (f),
; x, y (the x/y coordinates)
(defn live [f x y]
(let [neighbors
(+