本文介绍了当有fmap时,Haskell中的地图点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过的每个地方都使用 map fmap 。为什么Haskell的创建者觉得需要一个 map 函数?难道它不是目前所知的 fmap fmap 可以从语言中删除吗?

解决方案

我想提出一个答案,以引起对

Haskell 98被一些Haskellers看作是倒退了一步包括我),以前的版本已经定义了一个更抽象和更一致的库。哦,好。


Everywhere I've tried using map, fmap has worked as well. Why did the creators of Haskell feel the need for a map function? Couldn't it just be what is currently known as fmap and fmap could be removed from the language?

解决方案

I would like to make an answer to draw attention to augustss's comment:

Haskell 98 is seen as a step backwards by some Haskellers (including me), previous versions having defined a more abstract and consistent library. Oh well.

这篇关于当有fmap时,Haskell中的地图点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 10:58