robierzo Posted September 24, 2012 Author 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
robierzo Posted September 24, 2012 Author 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
Lee Mac Posted September 25, 2012 Posted September 25, 2012 (apply 'min (mapcar 'cadadr lista)) ? Quote
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.