From e5ce6c45ef943c7e7d136db533f1924f80b13cb6 Mon Sep 17 00:00:00 2001 From: Zornitsa Asanska Date: Sun, 7 Oct 2018 23:57:23 +0100 Subject: [PATCH] Added my name and some Haskell code --- README.md | 7 ++++++- code/HigherOrderFuctions.hs | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 code/HigherOrderFuctions.hs diff --git a/README.md b/README.md index 06ba005..6c808a6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg) +![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-pink.svg) ![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat) ![Up For Grabs](https://img.shields.io/badge/up--for--grabs-friendly-green.svg?style=flat) @@ -992,6 +992,11 @@ Please note that this project is released with a [Code of Conduct](CODE_OF_CONDU [![github-alt][github-img]](https://github.com/DRXDesign) [![dribbblegit status-alt][dribbble-img]](https://dribbble.com/DRXDesign) +### Zornitsa Asanska +- I am a first year university student and those are my first steps in GitHub. +- I love Mathematics, good food and OOP. I am currently studying Haskell, my first functional programming language. +-[![github-alt][github-img]] (https://github.com/ZornitsaAsanska) + ------------ ## Copyright diff --git a/code/HigherOrderFuctions.hs b/code/HigherOrderFuctions.hs new file mode 100644 index 0000000..fb4d683 --- /dev/null +++ b/code/HigherOrderFuctions.hs @@ -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 +