You should be automatically redirected . If not, visit
and update your bookmarks.


map frenzy

Faced with the task of getting the integer values out of this list of strings returned by a shell command:

("/Users/me/Pictures/image1.jpg" " pixelWidth: 450" " pixelHeight: 375"))

I ended up writing this:

(map 'set '( width height) (map int (map last (map parse (rest image-data)))))

It looks a bit odd, repeating the map four times. But I think it's nice, too.

Yes, it's a short post. I'm just testing the new Google/Blogger (Bloogle? Goggle?) API.


Post a Comment

Links to this post:

Create a Link

<< Home