Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NicolasSeinTemplateTest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
timucinboldt
NicolasSeinTemplateTest
Commits
d101f88e
Commit
d101f88e
authored
3 years ago
by
Nicolas Lenz
Browse files
Options
Downloads
Patches
Plain Diff
Formatting coaching
parent
d1048010
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
coaching/0-intro.md
+15
-12
15 additions, 12 deletions
coaching/0-intro.md
coaching/1-1-lambda.md
+28
-23
28 additions, 23 deletions
coaching/1-1-lambda.md
coaching/4-outro.md
+18
-14
18 additions, 14 deletions
coaching/4-outro.md
with
61 additions
and
49 deletions
coaching/0-intro.md
+
15
−
12
View file @
d101f88e
...
...
@@ -2,16 +2,16 @@
## Kontakt
Matrix: @eisfunke:eisfunke.com / https://matrix.to/#/@eisfunke:eisfunke.com
EisfunkeLab-Chatgruppe auf Matrix: #lab:eisfunke.com / https://matrix.to/#/#lab:eisfunke.com
Mail: nicolas.lenz@udo.edu
Website: https://www.eisfunke.com
EisfunkeLab-Newsletter: https://lab.eisfunke.com
Bytegeschichten: https://bytegeschichten.eisfunke.com
Meine FuPro-Folien: https://git.eisfunke.com/lab/fupro (vielleicht hilfreich für die Grundlagen)
-
Matrix: @eisfunke:eisfunke.com / https://matrix.to/#/@eisfunke:eisfunke.com
-
EisfunkeLab-Chatgruppe auf Matrix: #lab:eisfunke.com / https://matrix.to/#/#lab:eisfunke.com
-
Mail: nicolas.lenz@udo.edu
-
Website: https://www.eisfunke.com
-
EisfunkeLab-Newsletter: https://lab.eisfunke.com
-
Bytegeschichten: https://bytegeschichten.eisfunke.com
-
Meine FuPro-Folien: https://git.eisfunke.com/lab/fupro (vielleicht hilfreich für die Grundlagen)
**Alles auch nochmal auf:**
https://events.eisfunke.com/lab/cfupro21
Alles auch nochmal auf:
https://events.eisfunke.com/lab/cfupro21
## Plan
...
...
@@ -21,18 +21,21 @@ Drei Themenblöcke mit je drei Themen:
-
Datentypen: Wie funktioniert das, Listen, Strings, Tupel, Zahlen, Booleans, Maybe, Either und Typvariablen
-
Rekursive Funktionen, Pattern Matching, Bedingungen, wichtige Funktionen
-
Typklassen, Kinds, higher-order functions
-
Modellierung mit Datentypen
-
Faltungen und Church-Kodierung
-
Listenkomprehensionen
-
Funktoren, Applikative, Monaden, Plusmonaden, bind- und do-Notation
-
Wichtige Monaden: IO, Liste, Leser, Schreiber, Zustand, Zustandstransformer
## Zeitplan
09:00 bis 12:00 Block 1 & 2
12:00 bis 13:00 Mittagspause
13:00 bis 15:00 Block 3
-
**
09:00 bis 12:00
:**
Block 1 & 2
-
**
12:00 bis 13:00
:**
Mittagspause
-
**
13:00 bis 15:00
:**
Block 3
**Fragen? Gerne jederzeit!**
This diff is collapsed.
Click to expand it.
coaching/1-1-lambda.md
+
28
−
23
View file @
d101f88e
...
...
@@ -11,40 +11,38 @@ https://bytegeschichten.eisfunke.com/2021/08/17/bg006-lambda-kalkuel/
Die Definition von Lambda-Termen als Backus-Naur-Form:
Term ::= x | (Term Term) | λx . Term (x steht für beliebige Variable)
`
Term ::= x | (Term Term) | λx . Term
`
(x steht für beliebige Variable)
Beispiele:
-
y
-
λz . (x y)
-
(λj . j j) z
~> z z
-
(λx . x) y
~> y
-
`y`
-
`λz . (x y)`
-
`(λj . j j) z ~> z z`
-
`(λx . x) y ~> y`
## β-Reduktion
Regeln der Beta-Reduktion:
-
(λx.P) Q -->β P[x:=Q]
-
`
(λx.P) Q -->β P[x:=Q]
`
-
P -->β P' ==> P Q -->β P' Q
-
`
P -->β P' ==> P Q -->β P' Q
`
-
Q -->β Q' ==> P Q -->β P Q'
-
`
Q -->β Q' ==> P Q -->β P Q'
`
-
P -->β P' ==> λx.P -->β λx.P'
-
`
P -->β P' ==> λx.P -->β λx.P'
`
Bedeutet letztendlich: Argumente in Lambda-Funktionen einsetzen
Wichtig: Verschattung
-
(λx.(λx.x)) y --->β λx.x
-
(λx.(λx.x)) y -/->β λx.y
-
`
(λx.(λx.x)) y --->β λx.x
`
-
`
(λx.(λx.x)) y -/->β λx.y
`
Wichtig: Umbenennung
-
(λx.(λy.x y)) y --->β λy.y' y
-
(λx.(λy.x y)) y -/->β λy.y y
-
`
(λx.(λy.x y)) y --->β λy.y' y
`
-
`
(λx.(λy.x y)) y -/->β λy.y y
`
...
...
@@ -52,28 +50,32 @@ Wichtig: Umbenennung
Die Idee:
λx.x : c -> c
λy.z : a -> b
`
λx.x : c -> c
`
`
λy.z : a -> b
`
Die drei Regeln:
```
----------------------(var)
A ∪ {x : τ} |- x : τ
```
```
A |- M : σ → τ A |- N : σ
---------------------------------(app)
A |- (M N) : τ
```
```
A ∪ {x : σ} |- M : τ
----------------------(abs)
A |- λx.M : σ → τ
```
Beispiel-Typableitungsbaum für λs . λz . s (s z):
```
----------------------------------(var) ------------------------------(var)
{s : a -> a, z : a} |- s : a -> a {s : a -> a, z : a} |- z : a
----------------------------------(var) -------------------------------------------------------------------------(app)
...
...
@@ -84,22 +86,24 @@ Beispiel-Typableitungsbaum für λs . λz . s (s z):
{s : a -> a} |- \z . s (s z) : a -> a
-----------------------------------------(abs)
_ |- \s . \z . s (s z) : (a -> a) -> a -> a
```
Beachten: Es kann mehrere gültig ableitbare Typen für einen Term geben!
Z.B.
\x
.x : a -> a, aber auch
\x
.x : (a -> a) -> (a -> a)
Z.B.
`
\x.x : a -> a
`
, aber auch
`
\x.x : (a -> a) -> (a -> a)
`
Es gibt aber auch Terme und Kontexte, für die es keinen gültigen Typen gibt.
Beispiel: λx.x x
Beispiel:
`
λx.x x
`
Tipp: Um Schreibarbeit zu sparen, Kontext getrennt definieren
Sei K = {s : a -> a, z : ???}
Sei
`
K = {s : a -> a, z : ???}
`
Zunächst Baum von unten aus aufbauen und die Typen einfach leer lassen
Welche Regel eingesetzt werden muss und wie die Terme aussehen, ist immer eindeutig!
```
...
-----------------(var) ---------------------(app)
K |- s : a -> a K |- s z : ???
...
...
@@ -109,6 +113,7 @@ Welche Regel eingesetzt werden muss und wie die Terme aussehen, ist immer eindeu
{s : a -> a} |- \z . s (s z) : ???
------------------------------------(abs)
_ |- \s . \z . s (s z) : ???
```
Wenn der Baum fertig aufgebaut ist, Typen erst einsetzen.
...
...
This diff is collapsed.
Click to expand it.
coaching/4-outro.md
+
18
−
14
View file @
d101f88e
...
...
@@ -14,32 +14,36 @@ Falls ihr Lust habt, schreibt mir gerne nach der Klausur mal, wie es gelaufen is
EisfunkeLab-Newsletter: lab.eisfunke.com
## Mich unterstützen
Mehr davon, und noch viel mehr? Z.B. Haskell in der Praxis?
Die Vorbereitung, das Coaching und die Nachbereitung des Materials hat mich viele Stunden Zeit
gekostet, für die ich nicht bezahlt werde
In Zukunft würde ich außerdem gerne mehr solche und ähnlicher Veranstaltungen machen!
Ihr könnt mir helfen mit Feedback, Werbung, Mitmachen oder natürlich mit...:
Überweisung: Nicolas Lenz, IBAN: DE46 4306 0967 1089 7106 00, BIC: GENODEM1GLS
**
Überweisung:
**
Nicolas Lenz, IBAN: DE46 4306 0967 1089 7106 00, BIC: GENODEM1GLS
\
(für mich gebührenfrei, nicht anonym, bevorzugt)
PayPal: https://paypal.me/eisfunke
**
PayPal:
**
https://paypal.me/eisfunke
\
(für mich gebührenfrei, nicht anonym)
LiberaPay: https://liberapay.com/Eisfunke/
**
LiberaPay:
**
https://liberapay.com/Eisfunke/
\
(kostet mich Gebühren, anonym)
Vielen Dank!
**Vielen Dank!**
## Kontakt
Matrix: @eisfunke:eisfunke.com / https://matrix.to/#/@eisfunke:eisfunke.com
EisfunkeLab-Chatgruppe auf Matrix: #lab:eisfunke.com / https://matrix.to/#/#lab:eisfunke.com
Mail: nicolas.lenz@udo.edu
Website: https://www.eisfunke.com
EisfunkeLab-Newsletter: https://lab.eisfunke.com
Bytegeschichten: https://bytegeschichten.eisfunke.com
Meine FuPro-Folien: https://git.eisfunke.com/lab/fupro
-
Matrix: @eisfunke:eisfunke.com / https://matrix.to/#/@eisfunke:eisfunke.com
-
EisfunkeLab-Chatgruppe auf Matrix: #lab:eisfunke.com / https://matrix.to/#/#lab:eisfunke.com
-
Mail: nicolas.lenz@udo.edu
-
Website: https://www.eisfunke.com
-
EisfunkeLab-Newsletter: https://lab.eisfunke.com
-
Bytegeschichten: https://bytegeschichten.eisfunke.com
-
Meine FuPro-Folien: https://git.eisfunke.com/lab/fupro
(vielleicht hilfreich für die Grundlagen)
Alles auch nochmal auf:
https://events.eisfunke.com/lab/cfupro21
**Alles auch nochmal auf:**
https://events.eisfunke.com/lab/cfupro21
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment