Skip to content

Instantly share code, notes, and snippets.

@hmaurer
Created October 1, 2015 14:02
Show Gist options
  • Save hmaurer/658ed085a5f3a5d63770 to your computer and use it in GitHub Desktop.
Save hmaurer/658ed085a5f3a5d63770 to your computer and use it in GitHub Desktop.
-- Informatics 1 - Functional Programming
-- Lab Week Exercise
--
-- Week 2 - due: Friday, Oct 2nd, 5pm
--
-- Insert your name and matriculation number here:
-- Name:
-- Nr. :
import Test.QuickCheck
-- Exercise 3:
double :: Int -> Int
double x = x + x
square :: Int -> Int
square x = undefined
-- Exercise 4:
isTriple :: Int -> Int -> Int -> Bool
isTriple a b c = undefined
-- Exercise 5:
leg1 :: Int -> Int -> Int
leg1 x y = undefined
leg2 :: Int -> Int -> Int
leg2 x y = undefined
hyp :: Int -> Int -> Int
hyp x y = undefined
-- Exercise 6:
prop_triple :: Int -> Int -> Bool
prop_triple x y = isTriple (leg1 x y) (leg2 x y) (hyp x y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment