Added my name and some Haskell code

This commit is contained in:
Zornitsa Asanska
2018-10-07 23:57:23 +01:00
parent 4da95e9a22
commit e5ce6c45ef
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
--First steps in Higher Order Functions
divideByTen :: (Floating a) => a -> a
divideByTen = (/10)
divideTenBy :: (Floating a) => a -> a
divideTenBy = (10/)
subtractFour :: (Num a) => a -> a
subtractFour = (subtract 4)
--subtract a b returns b-a
-- subtract :: Num a => a -> a -> a
--subtract a returns (a -> a) - a function that takes one parameter and subtracts the already given one from it