mno2
Haskell 趣學指南

Updated 2 years ago

annter (@annder) started discussion #25

2 years ago · 0 comments

Open

關於Syntax in Function這一章的head'函數?

在代碼中寫的函數是這樣的:

head'  :: [a] ->a

head' [] = error "Can't call head on empty list"

head' [x:_] = x

我想問一下,head'中的[x:_]是什麽意思?

No comments on this discussion.


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

You’re not receiving notifications from this thread.


1 participant