(archive 'newLISPer)

June 15, 2007

map frenzy

Filed under: newLISP — newlisper @ 21:47

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.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: