Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started moving form utils into parsing
- Loading branch information
Showing
5 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
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
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
9 changes: 6 additions & 3 deletions
9
src/midje/util/treelike.clj → src/midje/parsing/util/form_utils.clj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
(ns midje.util.treelike | ||
(ns ^{:doc "Utility functions dealing with checking or tranforming forms or zippers."} | ||
midje.parsing.util.form-utils | ||
(:use midje.clojure.core | ||
[utilize.seq :only (first-truthy-fn)]) | ||
(:require [clojure.zip :as zip])) | ||
|
||
|
||
|
||
(defn tree-variant [treelike] | ||
(letfn [(is-zipper? [treelike] | ||
(:zip/make-node (meta treelike)))] | ||
(if (is-zipper? treelike) :zipper :form))) | ||
|
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
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