Skip to content

Commit 8c298e8

Browse files
author
Pascal Andermatt
committed
Merge remote-tracking branch 'origin/master'
2 parents 2ed5cc3 + d540140 commit 8c298e8

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

forschungsarbeit-ip6-fortschrittliche-abstraktionen-im-lambda-kalkuel/design-architektur.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Funktionen die mit einem **get** beginnen, geben wenn möglich den gewünschten
1313
> Funktion: **get**XYZ
1414
> Ergebnis: **Wert** oder _**undefined**_
1515
16-
Beispiele: [getElementByIndex](immutable-stack-erweiterungen.md#getelementbyindex), [getIndexOfElement](immutable-stack-erweiterungen.md#getindexofelement), getDomElement
16+
Beispiele: [getElementByIndex](immutable-stack-erweiterungen.md#getelementbyindex), [getIndexOfElement](immutable-stack-erweiterungen.md#getindexofelement), [getDomElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ab73376bb19c4bad3d78d0da4cf69a0271ce3aa7/src/maybe/maybe.js#L143), [getDomElements](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ab73376bb19c4bad3d78d0da4cf69a0271ce3aa7/src/maybe/maybe.js#L155)
1717

1818
### maybe-Präfix
1919

forschungsarbeit-ip6-fortschrittliche-abstraktionen-im-lambda-kalkuel/either.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Eine Either Funktion XYZ wird mit einem oder mehreren Parametern aufgerufen. Am
3838
```javascript
3939
// Anwendung
4040
eitherXYZ(someParam)
41-
(error => doSomethingInErrorCase(error) ) // Left Case
41+
(error => doSomethingInErrorCase(error) ) // Left Case
4242
(result => doSomethingInSuccessCase(result) ) // Right Case
4343
```
4444

@@ -164,14 +164,14 @@ eitherElementsOrErrorsByFunction:: (a -> Either a) -> [a] -> Either [a]
164164
**Beispiel**
165165

166166
```javascript
167-
eitherElementsOrErrorsByFunction(eitherDomElement)("inputText", "newValue")
168-
(err => doSomethingWithErrorMessages) // err === stack mit den fehlende Elementen
169-
(result => { // result === listMap mit den Resultaten
167+
eitherElementsOrErrorsByFunction(eitherDomElement)("inputText", "output")
168+
(err => doSomethingWithErrorMessages) // stack mit Fehlermeldungen
169+
(result => { // listMap mit den Resultaten
170170

171171
// Die Resultate als einzelne Variablen
172-
const [inputText, newValue] = convertListMapToArray(result);
172+
const [inputText, output] = convertListMapToArray(result);
173173

174-
doSomethingWithResult(inputText, newValue);
174+
doSomethingWithResult(inputText, output);
175175

176176
})
177177
```

forschungsarbeit-ip6-fortschrittliche-abstraktionen-im-lambda-kalkuel/immutable-stack-erweiterungen.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In den folgenden Beispielen wird zur besseren Übersicht, die Stack Datenstruktu
2727
Die Titel der Funktionen sind mit einem Link zur Implementation verknüpft
2828
{% endhint %}
2929

30-
### [concat](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L734)
30+
### [concat](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L732)
3131

3232
Die Funktion `concat` nimmt zwei Stacks entgegen und konkateniert diese.
3333

@@ -43,7 +43,7 @@ const stack4 = convertArrayToStack( [4] );
4343
concat(stack3)(stack4) // [ 1, 2, 3, 4 ]
4444
```
4545

46-
### [flatten](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L768)
46+
### [flatten](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L766)
4747

4848
Die Funktion `flatten` nimmt einen Stack entgegen, dessen Einträge Stacks sind. Die Funktion verknüpft diese alle zusammen zu einem Stack. Das Tiefenlevel, bis zu welcher die Struktur abgeflacht wird ist 1.
4949

@@ -57,7 +57,7 @@ const stackWithStacks = convertArrayToStack( [s1, s2, s3] ); // [ [1, 2], [3, 4]
5757
flatten(stackWithStacks) // [ 1, 2, 3, 4, 5, 6]
5858
```
5959

60-
### [zipWith](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L795)
60+
### [zipWith](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L793)
6161

6262
Die `zipWith`Funktion nimmt eine Verknüpfungsfunktion und zwei Stacks entgegen. Anhand der Verknüpfungsfunktion werden die Elemente der beiden übergebenen Stacks paarweise miteinander verknüpft zu einem neuen Stack.
6363

@@ -74,7 +74,7 @@ const s2 = convertArrayToStack( [4, 5] );
7474
zipWith(add)(s1)(s2) // [ 5, 7 ]
7575
```
7676

77-
### [zip _\(with pair\)_](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L848)
77+
### [zip _\(with pair\)_](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L846)
7878

7979
Die `zip` Funktion nimmt zwei Stacks entgegen und verknüpft die beiden Stacks mit der Funktion `pair`.
8080

@@ -89,7 +89,7 @@ const s2 = convertArrayToStack( [3, 4] );
8989
zip(s1)(s2) // [ (1, 3), (2, 4) ]
9090
```
9191

92-
### [stackEquals](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L863)
92+
### [stackEquals](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L861)
9393

9494
Die Funktion `stackEquals` nimmt zwei Stacks entgegen und vergleicht alle Elemente mit dem JavaScript `===` Operator auf Gleichheit. Wenn alle Vergleiche `true` ergeben, gibt die Funktion ein Church-Boolean `True` ansonsten ein Church-Boolean `False` zurück.
9595

@@ -100,7 +100,7 @@ const s2 = convertArrayToStack( [1, 2] );
100100
stackEquals(s1)(s2) // True (Church Boolean)
101101
```
102102

103-
### [getElementByIndex](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L242)
103+
### [getElementByIndex](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L242)
104104

105105
Die Funktion `getElementByIndex` nimmt einen Stack und eine [Church-](../forschungsarbeit-ip5-lambda-kalkuel/church-encodings-zahlen-und-boolesche-werte.md#church-zahlen) oder JS-Zahl, die den Index des Elements repräsentiert, entgegen. Falls an diesem Index ein Element existiert, wird dieses zurückgegeben ansonsten wird auf der Console einer Error geloggt und der Rückgabewert ist `undefined`.
106106

@@ -140,7 +140,7 @@ Die Funktion `getElementByIndex`wurde erweitert, dass der Index auf den "Typ" ko
140140
* **\`\`**[**`eitherElementByChurchIndex`**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L290)**\`\`**
141141
{% endhint %}
142142

143-
### [removeByIndex](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L666)
143+
### [removeByIndex](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L664)
144144

145145
Die Funktion `removeByIndex` nimmt einen Stack und eine [Church-](../forschungsarbeit-ip5-lambda-kalkuel/church-encodings-zahlen-und-boolesche-werte.md#church-zahlen) oder JS-Zahl als Index entgegen. Die Funktion löscht das Element am übergebenen Index und gibt den neuen Stack zurück.
146146
Bei einem nicht existierenden Index erhält man denselben Stack unverändert zurück.
@@ -154,7 +154,7 @@ removeByIndex(stackWithStrings)(n2) // [ "Hello", "World" ]
154154
removeByIndex(stackWithStrings)(999) // [ "Hello", "Haskell", "World" ]
155155
```
156156

157-
### [getIndexOfElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L370)
157+
### [getIndexOfElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L368)
158158

159159
Die Funktion `getIndexOfElement` nimmt einen Stack und ein Element entgegen und gibt den Index als JavaScript-Zahl von diesem Element zurück. Wenn das Element nicht existiert wird `undefined` zurückgegeben.
160160

@@ -167,7 +167,7 @@ getIndexOfElement(stackWithNumbers)(10) // 3
167167
getIndexOfElement(stackWithNumbers)(100) // undefined
168168
```
169169

170-
### [maybeIndexOfElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L398)
170+
### [maybeIndexOfElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L396)
171171

172172
Die Funktion `maybeIndexOfElement` ist analog zur Funktion [getIndexOfElement](immutable-stack-erweiterungen.md#getindexofelement). Nur der Rückgabetyp ist ein [Maybe](maybe.md).
173173

@@ -195,7 +195,7 @@ containsElement(stackWithNumbers)(33) === True
195195
containsElement(stackWithNumbers)(44) === False
196196
```
197197

198-
### [convertElementsToStack](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/1854cf6515e5f1ba74c48c4a9a97f12e5e363aa2/src/stack/stack.js#L454)
198+
### [convertElementsToStack](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/aa8e41e3aff711a63a0f1ece95931753b297ca24/src/stack/stack.js#L452)
199199

200200
Die Funktion `convertElementsToStack` nimmt einen Rest Parameter \([JavaScript Rest Parameter](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Functions/rest_parameters)\) entgegen. Die übergebenen Elemente werden in ein Stack umgewandelt.
201201

0 commit comments

Comments
 (0)