题目
题目
单项选择题

Question at position 7 Given the following Haskell function: Which one of the following expressions correctly applies increment to a value of type Maybe Int? Clear my selection

选项
A.
B.
C.
D.
题目图片
查看解析

查看解析

标准答案
Please login to view
思路分析
To determine which expression correctly applies increment to a Maybe Int, let’s examine the type and the available combinators. Option 1: fmap increment (Just 5) - Here, fmap has type (a -> b) -> t a -> t b, where t is a Functor. Maybe is a Functor, so fmap increment (Jus......Login to view full explanation

登录即可查看完整答案

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

类似问题

更多留学生实用工具

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