robierzo Posted September 24, 2012 Author Share Posted September 24, 2012 (edited) I ask here to not open another topic. For to get smallest Y from this list (setq lista '((14.563 (14 11)) (8.654 (10 18)) (12.647 (4 3)) (3.478 (1 9)))) Result: 3 I use this, but it works: (setq Y_Minima (apply 'min (mapcar 'cadr lista))) Edited September 24, 2012 by robierzo Quote Link to comment Share on other sites More sharing options...
robierzo Posted September 24, 2012 Author Share Posted September 24, 2012 Although it is unprofessional: (foreach n lista (if (or (= y_minim nil) (< (cadr (cadr n)) y_minim)) (setq y_minim (cadr (cadr n)))) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 25, 2012 Share Posted September 25, 2012 (apply 'min (mapcar 'cadadr lista)) ? Quote Link to comment Share on other sites More sharing options...
robierzo Posted September 25, 2012 Author Share Posted September 25, 2012 Thanks, Lee. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.