Skip to content

Instantly share code, notes, and snippets.

____ _ _ _____ _______ ___
/ ___(_)___| |_ | ___|_ _\ \ / / |
| | _| / __| __| | |_ | | \ \ /\ / /| |
| |_| | \__ \ |_ | _| | | \ V V / |_|
\____|_|___/\__| |_| |_| \_/\_/ (_)
(defn converging-seq
[coll]
(for [[x y] (partition 2 1 (cons (gensym) coll)) :while (not (= x y))] y))
(defn converging-seq2
[[x y & tl]]
(cond (nil? x) []
(nil? y) [x]
(= x y) [x]
:else (lazy-seq (cons x (converging-seq2 (cons y tl))))))
public void foo(int i){
if (externalmethod(i) == null){
throw new Exception();
}
}
(ns test
(:use [penumbra.opengl])
(:require [penumbra.app :as app]
[penumbra.text :as text]))
(defn reshape [[x y width height] state]
(frustum-view 60.0 (/ (double width) height) 1.0 100.0)
(load-identity)
state)
#!/usr/bin/env coffee
# `crawler.coffee` - a simple http crawler recording the timings of GET request.
# Require http, jquery and underscore
http = require('http')
$ = require('jquery')
_ = require('underscore')
# Set options for http client
(prn (let [n nil]
(match [n]
[([:black [:red [:red _ _ _] _ _] _ _] |
[:black [:red _ _ [:red _ _ _]] _ _] |
[:black _ _ [:red [:red _ _ _] _ _]])]
nil)))
(let [x [1 2]]
(match [x] [([1 2] | [3 4] | [5 6] | [7 8] | [9 10])] nil))
$ ->
map = new google.maps.Map $("#map-canvas")[0],
zoom: 1
mapTypeId: google.maps.MapTypeId.ROADMAP
map.setCenter new google.maps.LatLng(0, 0)
addMarker = (long, lat) ->
new google.maps.Marker
position: new google.maps.LatLng long, lat
map: map
### Keybase proof
I hereby claim:
* I am kasperlanger on github.
* I am kasperlanger (https://keybase.io/kasperlanger) on keybase.
* I have a public key whose fingerprint is B6D9 D5E9 6531 683B 2B33 4573 EA32 287B A880 A8EE
To claim this, I am signing this object: