Created
July 19, 2011 03:10
-
-
Save jsnikeris/1091232 to your computer and use it in GitHub Desktop.
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
How can I remove the repetition found in the last two lines? | |
(require '[net.cgrand.enlive-html :as e]) | |
(e/at entry | |
[:id] (e/content id) | |
[#{:published :updated}] (e/content (str pub-date)) | |
[[:link (e/attr= :rel "edit")]] (e/set-attr :href (str edit-url)) | |
[[:link (e/attr= :rel "alternate")]] (e/set-attr :href (str edit-url))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The only part of the last two lines that is changing are the strings "edit" and "alternate". How can I remove this repetition?