(pseudo codes)

f1 :: [forall a] a -> Int

f1 x = 1

In contrast, existential quantified functions are very useful, because there're always *some* types can do certain things. Use the same example:

f2 :: [exist a] a -> Int

f2 x = length x

I can do nearly anything inside f2, because there's always some x will satify the operations applied on them.

You should notice that only functions or Bottom can have universal quantified type.

Bound helps universal quantification a lot. When you give a bound to universal quantification, you give it extra informations.

一個人的價值，應該看他貢獻了什麼，而不是他取得了什麼......................................... ........................

ReplyDelete很棒很期待新的內容............................................................

ReplyDelete認識自己,是發現妳的真性格、掌握妳的命運、創照你前程的根源。............................. ....................................

ReplyDelete你文章很棒的~繼續分享給大家~~~~..................................................

ReplyDelete唯有用熱情、用智慧去觀察事物，這事物才會把他的秘密，洩漏給我們......................................................................

ReplyDelete