Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Lab1 where
- square :: Int->Int
- square x = x*x
- prod :: Int->Int->Int
- prod x y = x*y
- z = if True then 1 else 2
- ispositive :: Int->Bool
- ispositive x = if x>0 then True else False
- singnum :: Int->Int
- singnum x = if x>0 then 1 else if x<0 then -1 else 0
- max3 :: Int->Int->Int->Int
- max3 a b c = if a>b && a>c then a else if b>a && b>c then b else c
- sort2 :: Int->Int->(Int,Int)
- bothTrue :: Bool->Bool->Bool
- bothTrue :: ne ispolzyite logi4eskie operatsii
- solvel :: Double->Double->(Bool,Double)
- true esli resh syshestvyet false v protivnom sluchae
- pri etom vtoroi element ravent znach kornya libo nylu
- isParallel :: Double->Double->Double->Double->Bool
- true esli dva otrezka konci kotorih zadautsya v argumentah funkcii parallelni false esli net
- isIncluded :: Double->Double->Double->Double->Double->Double->Bool
- true esli vtoraya vnytri pervoi
- isRectangular :: Double->Double->Double->Double->Double->Double->Bool
- true esli pryamoygolniy
- isTriangle :: Double->Double->Double->Double->Double->Double->Bool
- true esli treugolnik
- isSorted :: Int->Int->Int->Bool
- true esli sorted
Advertisement
Add Comment
Please, Sign In to add comment