Week 3 Pattern matching a recursion

 0    4 cartonașe    up804653
descarcă mp3 printează joacă Testează-te
 
Întrebare English Răspuns English
functions use what kind of notation?
începe să înveți
Prefix eg mod n 2
operatoes use what kind of notation?
începe să înveți
infix eg 2 * 3
define pattern matching
începe să înveți
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?
începe să înveți
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"

Trebuie să te autentifici pentru a posta un comentariu.