Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定一个列表,其中每个项目都是(rgb)颜色,返回一个列表,该列表由每种颜色的最大分量组成。
示例:给定 ((123 200 6) (10 30 20) (212 255 10) (0 0 39) (37 34 34)),代码应返回 (200 30 255 39 37)
(define (sublist-max list-of-lists) (map (lambda (sublist) (apply max sublist)) list-of-lists))