Skip to content

Instantly share code, notes, and snippets.

@boolpath
boolpath / littleschemer.clj
Created October 19, 2021 20:27 — forked from gar3thjon3s/littleschemer.clj
Little schemer in clojure
(defn atom? [x]
(not (list? x)))
(def car first)
(def cdr next)
(def add1 inc)
(def sub1 dec)
(defn lat? [lst]
(every? atom? lst))
@boolpath
boolpath / test.rb
Last active August 29, 2015 14:06 — forked from avsej/test.rb
require 'rubygems'
require 'couchbase'
def transfer(source, destination, amount)
cb = Couchbase.bucket
# prepare transaction document
id = cb.incr("transaction:counter", :create => true)
trans_id = "transaction:#{id}"
cb.set(trans_id, {"source" => source, "destination" => destination,