PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
but muh tinfoil
9 sec ago
ser_1369510892129
11 sec ago
Untitled
12 sec ago
Untitled
16 sec ago
Untitled
18 sec ago
Untitled
18 sec ago
REVOLT CARS PC GAME
33 sec ago
Untitled
23 sec ago
Untitled
By: a guest on
Jun 10th, 2012
| syntax:
Clojure
| size: 0.13 KB | hits: 41 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
(
defn
identify
[
root
]
(
doseq
[
w
(
select root
[
:
*
]
)
]
(
if-let
[
n
(
.
getName w
)
]
(
selector
/
id
-
of
!
w
(
keyword n
)
)
)
)
root
)
create a
new version
of this paste
RAW Paste Data
(defn identify [root] (doseq [w (select root [:*])] (if-let [n (.getName w)] (selector/id-of! w (keyword n)))) root)