0

Haskell笔记 (18)—— Polymorphic function和oveloaded function

Posted by nanxiao on 二月 15, 2016 in Haskell笔记 |

A function is called polymorphic (“of many forms”) if its type contains one or more type variables. E.g.: length :: [a] -> Int

A polymorphic function is called overloaded if its type contains one or more class constraints. E.g.: (+) :: Num a => a -> a -> a.

 

标签:

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Copyright © 2013-2017 我的站点 All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.