Week 3 Pattern matching a recursion

 0    4 词汇卡    up804653
下载mp3 打印 检查自己
 
问题 English 答案 English
functions use what kind of notation?
开始学习
Prefix eg mod n 2
operatoes use what kind of notation?
开始学习
infix eg 2 * 3
define pattern matching
开始学习
checking a given sequence of tokens for the presence of the constituents of some pattern eg (||): Bool -> Bool -> Bool /n True || _ = True /n False || a = a
what is a recursive definition?
开始学习
one that is defined in terms of its self eg fact: Int -> Int /n fact n /n | n > 0 = n * fact (n - 1) /n | n == 0 = 1 /n | otherwise = error "undefined for neg ints"

您必须登录才能发表评论。