Created
          September 21, 2017 17:26 
        
      - 
      
 - 
        
Save tynovsky/a43a0aaf030f2ee9b667cc2673f5b3ca to your computer and use it in GitHub Desktop.  
    haskell quickcheck
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import Test.QuickCheck | |
| rev :: [a] -> [a] | |
| rev xs = rev' xs [] where | |
| rev' [] acc = acc | |
| rev' (x:xs) acc = rev' xs (x:acc) | |
| prop_revapp :: [Int] -> [Int] -> Bool | |
| prop_revapp xs ys = rev (xs++ys) == rev ys ++ rev xs | |
| main = quickCheck prop_revapp | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment