Skip to content

Instantly share code, notes, and snippets.

(ns newtons-method.core)
(defn square [x]
(* x x))
(defn good-enough? [guess x]
(< (Math/abs (- (square guess) x)) 0.001))
(defn average [x y]
(/ (+ x y) 2))
(ns blackjack-helper.core
(:require [clojure.string :as str]
[clojure.set :as set])
(:gen-class))
(def H "HIT")
(def D "DOUBLE if allowed, otherwise HIT")
(def DS "DOUBLE if allowed, otherwise STAND")
(def S "STAND")
(def SP "SPLIT")