Skip to content

Commit 4748e4c

Browse files
BenjaminBrodwolfgitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent aa8e41e commit 4748e4c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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)