Mercurial > 12ws.info2
view exercises/src/Exercise_4.hs @ 7:b50c976522fa
week 4
author | Markus Kaiser <markus.kaiser@in.tum.de> |
---|---|
date | Wed, 07 Nov 2012 20:27:58 +0100 |
parents | |
children | 8689a0a4b38e |
line wrap: on
line source
module Exercise_4 where import Test.QuickCheck import Data.List {---------------------------------------------------------------------} {- Aufgabe G4.1 -} hasFibonacciProperty :: [Integer] -> Bool hasFibonacciProperty xs = undefined {---------------------------------------------------------------------} {- Aufgabe G4.2 -} cryptChar :: [(Char,Char)] -> Char -> Char cryptChar [] c = '_' cryptChar ((k,v) : ks) c = undefined crypt :: [(Char,Char)] -> [Char] -> [Char] crypt key [] = [] crypt key (x : xs) = undefined isKeyReversible :: [(Char,Char)] -> Bool isKeyReversible [] = True isKeyReversible ((k,v) : ks) = undefined {- QuickCheck Tests -} {---------------------------------------------------------------------} {- Aufgabe G4.3 -} {- - Proof me! -} {---------------------------------------------------------------------} {- Aufgabe G4.4 -} match :: [Char] -> [Char] -> Bool match xs ys = undefined {---------------------------------------------------------------------} {- Aufgabe H4.1 -} strictlyDescending :: [Integer] -> Bool strictlyDescending = undefined {---------------------------------------------------------------------} {- Aufgabe H4.2 -} chunks :: Int -> [a] -> [[a]] chunks = undefined irregularChunks :: [Int] -> [a] -> [[a]] irregularChunks = undefined {---------------------------------------------------------------------} {- Aufgabe H4.3 -} {-WETT-} upsAndDowns :: Ord a => [a] -> [[a]] upsAndDowns = undefined {-TTEW-} {---------------------------------------------------------------------} {- Aufgabe H4.4 -} {- - <Hier Induktionsbeweis einfügen> -}