Skip to content

Instantly share code, notes, and snippets.

#lang racket
(require rackunit)
;; Y combinator derivation in detailed steps
;; (based on Why of Y derivation by Matthias Felleisen)
;; Is it possible to define a recursive function without referrring to itself?
;; Define a simple recursive function which refers to itself.
try {
JSONObject personData = db.getJSONObject(DATA_TABLE).getJSONObject(userId.getUserId(token)); > this should return null
if (personData == null) {
personData = new JSONObject();
db.getJSONObject(DATA_TABLE).put(userId.getUserId(token), personData);
}
for (Map.Entry<String, String> entry : values.entrySet()) {
personData.put(entry.getKey(), entry.getValue());
}
@hkhan
hkhan / git.bash
Created November 24, 2011 20:43
basic git commands
git checkout -t origin/feature
# creates and checks out "feature" branch that tracks "origin/feature"
git push -u origin master
# pushes the "master" branch to "origin" remote and sets up tracking
git pull-request -h [project]:[branch]
# generate a pull-request from the specified branch e.g git pull-request -h nature:669-viewer-api