defstruct is old and I'm pretty sure there's no reason to use it. defrecord is a drop-in replacement though for something simple and not performance-sensitive you might consider just using hashmaps.
to-resolution seems like it should be named get-resolution or resolution-of or something, but the implementation is fine. wallpaper-resolution? has a common antipattern: #(= % blah) is usually better written as #{blah} because of the way sets behave when treated as functions. to-wallpaper-name looks fine to me, though you would probably be happier using clojure.core/subs instead of String.substring. There's nothing wrong with the (let [x ...] (assoc x :a :b)) pattern if you want to give each step a "name" (here x); but I'd like to point out in case you didn't notice that this could be written as (assoc ... :a :b). (let) already includes an implicit do; it's not clear why you're wrapping your let form with a do in do-file-wallpaper. Overall I'd say it's well-written; my nitpicks are pretty minor here. On Jan 18, 8:59 am, Tim Visher <tim.vis...@gmail.com> wrote: > Hi Everyone, > > I'm attempting to use Clojure to write a Wallpaper Library app. My > first stab at a small subset of the functionality is done and I can't > see how to improve it. I'm not particularly happy with it from a > readability perspective as well as a visibility perspective. > > I find to-wallpaper-name and file-to-wallpaper to be the worst offenders. > > I'd love to have the code torn apart a little bit and get some > suggestions for improvements. > > It's located athttps://gist.github.com/784744 > > Thanks in advance! > > -- > > In Christ, > > Timmy V. > > http://blog.twonegatives.com/http://five.sentenc.es/-- Spend less time on mail -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en