Skip to content
Snippets Groups Projects
Commit c66c2e02 authored by Nicolas Lenz's avatar Nicolas Lenz :snowflake:
Browse files

Move chapters

parent 03cf90d7
Branches
No related tags found
No related merge requests found
......@@ -14,12 +14,12 @@ Nicolas Lenz
## Contact & Links
**Mail:** \
[nicolas.lenz@udo.edu](mailto:nicolas.lenz@udo.edu)
[nicolas@eisfunke.com](mailto:nicolas@eisfunke.com)
**Homepage** (with more contact data and links to projects): \
[eisfunke.com](https://www.eisfunke.com)
**My GitLab instance** (with some Haskell stuff): \
**My GitLab** (with my projects, including Haskell stuff): \
[git.eisfunke.com](https://git.eisfunke.com)
## Interaction & Questions
......@@ -39,23 +39,3 @@ Very good, fun to read, free to read online and base for this workshop:
\centering
![](res/certificate.png)
## Haskell
We'll be using [Haskell](https://www.haskell.org/).
![](res/logo-haskell.png)
- Since 1990
- Purely functional
- Statically & strongly typed
- Used in academic context
## Other Functional Languages
- Scala
- Lisp
- Scheme
- F#
- [Lightfold](https://git.eisfunke.com/software/lightfold/lightfold)
- Many others in varying degrees
# Motivation
## Motivation
::: important
Why learn functional programming?
:::
## What is Functional Programming?
- To answer that question, we have to first find out what functional programming even is
## Imperative
- *Imperative* vs. *Functional*
- Programming lanuages like Java or C are **imperative**
- Program = sequence of commands to be executed one after another
```
x = 2
doThing(x)
x = 4
doThing(x)
```
Works without problem.
## Functional
- Different approach
- In **functional** programming a program is **not** a list of commands
- Program = *collection of definitions*
```haskell
x = 2
x = 4
```
Will *this* work?
## Advantages
TODO side effects
TODO global state
TODO higher-order functions (map, filter, etc. fold)
- https://kotlinlang.org/docs/lambdas.html#higher-order-functions
- https://linqexamples.com/filtering/where.html
- https://www.w3schools.com/python/python_lambda.asp
- https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions
- https://attacomsian.com/blog/java-filter-map
TODO brevity (quicksort)
TODO easer to reason about
## Functional Languages
There are many mainly functional programming languages:
- Scala
- Lisp
- Scheme
- F#
- [Lightfold](https://git.eisfunke.com/software/lightfold/lightfold)
- Many others in varying degrees
## Haskell
However, we'll be using [Haskell](https://www.haskell.org/).
![](res/logo-haskell.png)
- Since 1990
- Purely functional
- Statically & strongly typed
- Used in academic context
File moved
# What is Functional Programming?
## The Difference
- *Imperative* vs. *Functional*
- Programming lanuages like Java or C are **imperative**
- Program = sequence of commands to be executed one after another
```
x = 2
doThing(x)
x = 4
doThing(x)
```
Works without problem.
## Functional
- Different approach
- In **functional** programming a program is **not** a list of commands
- Program = *collection of definitions*
```haskell
x = 2
x = 4
```
Will *this* work?
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
template @ f512fcae
Subproject commit 4a8f277ee2ba6ac30d23cfb3c35b874a8bc612f9
Subproject commit f512fcaeec86489fb583ff5cbebf52539778cd28
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment