Haskell 趣學指南

Updated 2 years ago

tonado (@tonado) started discussion #10

3 years ago · 0 comments


Enum 的成员都是连续的型别 -- 也就是可枚举。Enum 类存在的主要好处就在于我们可以在 Range 中用到它的成员型别:每个值都有后继子 (successer) 和前置子 (predecesor),分别可以通过 succ 函数和 pred 函数得到。该 Typeclass 包含的型别有:(), Bool, Char, Ordering, Int, Integer, Float 和 Double。

Type And Typeclass (Edit this file)

successer should be successor

No description provided.

No comments on this discussion.

to join this conversation on GitBook. Already have an account? Sign in to comment

You’re not receiving notifications from this thread.

1 participant