Mercurial > rlm
view src/rlm/abomination_desolation.clj @ 0:78a630e650d2
initial import
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 18 Oct 2011 00:57:08 -0700 |
parents | |
children |
line wrap: on
line source
1 (ns abomination-desolation)3 ;; The Abomination:5 (defmacro dolet [& [_ eq :as s]]6 (if (and eq (= "=" (name eq)))7 (let [[lcl _ expr & more] s]8 `(let [~lcl ~expr]9 (dolet ~@more)))10 (let [[expr & more] s]11 (if (empty? more)12 expr13 `(do ~expr (dolet ~@more))))))15 ;; The Desolation:17 (defn doit []18 (dolet19 i = 520 j = 1021 (println i j)22 k = (+ i j)23 (* k 2)))