题目
题目

CPT_S-355-PULLM-1-LEC Scheduled Quiz 1

单项选择题

Given the following definition of computeList  When you invoke it as follows What is the result?

选项
A.[4,6,8,10]
B.[2,4,6,8]
C.[3,5,7,9]
D.[3, 7, 11, 5]
题目图片
查看解析

查看解析

标准答案
Please login to view
思路分析
First, I restate the problem setup in my own words to anchor the analysis: computeList is defined as computeList xs = map (\x -> x * 2 + 1) xs, and it's evaluated with a given input xs. The lambda function takes each element x of the list and computes x * 2 + 1, and map applies this function to every element of xs. Option-by-option analysis: - Option "[4,6,8,10]": If......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!