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"

コメントを投稿するにはログインする必要があります。