This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun smart-line-beginning () | |
"Move point to the beginning of text on the current line; if that is already the current position of point, then move it to the beginning of the line." | |
(interactive) | |
(let ((pt (point))) | |
(beginning-of-line-text) | |
(when (eq pt (point)) | |
(beginning-of-line)))) | |
(global-set-key "\C-a" 'smart-beginning-of-line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Define the 'class' class | |
$class = Obj() | |
->fn('new', function ($class) { | |
$newClass = Obj($class->methods) | |
->fn('new', function($class) { | |
$obj = Obj($class->imethods); | |
$args = func_get_args(); | |
array_shift($args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns life (:use clojure.test clojure.set)) | |
(def under-populated 1) | |
(def over-populated 4) | |
(def fertile 3) | |
(defn north [[x y]] [x (inc y)]) | |
(defn south [[x y]] [x (dec y)]) | |
(defn east [[x y]] [(inc x) y]) | |
(defn west [[x y]] [(dec x) y]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject hello-world "1.0.0-SNAPSHOT" | |
:description "FIXME: write" | |
:dependencies [[org.clojure/clojure "1.1.0"] | |
[org.clojure/clojure-contrib "1.1.0"] | |
[compojure "0.4.0-SNAPSHOT"] | |
[ring/ring-jetty-adapter "0.2.0"]]) |
NewerOlder