









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin
Prelude> ord(’a’) 97 Prelude> chr(97) ’a’ Prelude> ord(chr(103)) 103 Prelude> chr(255) ’\255’ Prelude> (ord ’9’)- (ord ’0’) 9 Prelude> (ord ’a’)- (ord ’A’) 32
Prelude> "a b c" "a b c" Prelude> "a, b, c" "a, b, c"
inc x = x + 1 imply p q = not p || q digit c = (’0’ <= c) && (c <= ’9’)
offset = (ord ’a’) - (ord ’A’)
absolute x | x >= 0 = x | otherwise = -x