Skip to content

Commit 05b9533

Browse files
BenjaminBrodwolfgitbook-bot
authored andcommitted
GitBook: [master] 3 pages modified
1 parent ed3a8e4 commit 05b9533

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

forschungsarbeit-ip6-fortschrittliche-abstraktionen-im-lambda-kalkuel/box-maybebox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Stream(1,2,3,4)
213213
(fold)( filter(x => x > 4) )
214214
```
215215

216-
### [HttpGet](observable.md#implementation-2)
216+
### [HttpGet](observable.md#observable-httpget-joke-example)
217217

218218
```javascript
219219
// Synchron

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ eitherXYZ(someParam)
4242
(result => doSomethingInSuccessCase(result) ) // Right Case
4343
```
4444

45-
### [eitherTruthy](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L63)
45+
### [eitherTruthy](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L62)
4646

4747
Die `eitherTruthy` Funktion erwartet einen Wert und überprüft ob dieser 'truthy' ist. Im Erfolgsfall wird ein `Right` mit dem Element zurück gegeben und im Fehlerfall ein `Left` mit der entsprechenden Fehlermeldung.
4848

@@ -57,7 +57,7 @@ const eitherTruthy = value =>
5757
: Left(`'${value}' is a falsy value`);
5858
```
5959

60-
### [eitherNotNullAndUndefined](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L85)
60+
### [eitherNotNullAndUndefined](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L84)
6161

6262
Die `eitherNotNullAndUndefined` ****Funktion erwartet einen Wert und überprüft ob dieser nicht **null** oder **undefined** ist.
6363

@@ -83,7 +83,7 @@ const eitherElementOrCustomErrorMessage = errorMessage => element =>
8383
eitherElementOrCustomErrorMessage("Der Wert ist Null")(null); // Left ("Der Wert ist null")
8484
```
8585

86-
### [eitherDomElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L120)
86+
### [eitherDomElement](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L119)
8787

8888
Die `eitherDomElement` Funktion nimmt eine Id für ein Dom-Element entgegen und gibt ein Either Type zurück. Im Erfolgsfall wird das HTML-Element zurückgegeben sonst eine Fehlermeldung, dass ein solches Element nicht existiert.
8989

@@ -94,7 +94,7 @@ const eitherDomElement = elemId =>
9494
(document.getElementById(elemId));
9595
```
9696

97-
### [eitherNumber](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L177)
97+
### [eitherNumber](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L176)
9898

9999
Die `eitherNumber` Funktion überprüft ob ein Wert vom Typ Integer ist.
100100

@@ -105,7 +105,7 @@ const eitherNumber = val =>
105105
: Left(`'${val}' is not a integer`);
106106
```
107107

108-
### [eitherNaturalNumber](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L188)
108+
### [eitherNaturalNumber](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L187)
109109

110110
Die `eitherNaturalNumber` Funktion überprüft ob der übergebene Wert eine natürliche JavaScript-Zahl ist.
111111

@@ -116,7 +116,7 @@ const eitherNaturalNumber = val =>
116116
: Left(`'${val}' is not a natural number`);
117117
```
118118

119-
### [eitherFunction](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L199)
119+
### [eitherFunction](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L198)
120120

121121
Die `eitherFunction` Funktion überprüft ob ein Wert vom Typ _function_ ist.
122122

@@ -127,7 +127,7 @@ const eitherFunction = val =>
127127
: Left(`'${val}' is not a function`);
128128
```
129129

130-
### [eitherTryCatch](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L223)
130+
### [eitherTryCatch](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L222)
131131

132132
Die `eitherTryCatch` Funktion nimmt eine Funktion `f` entgegen, die schief gehen könnte. Diese Funktion wird in einem try-catch Block ausgeführt. Wenn ein Fehler auftritt während der Funktionsausführung wird dieser gefangen und es wird ein `Left` mit der Fehlermeldung zurückgegeben, ansonsten ein `Right` mit dem Resultat.
133133

@@ -145,7 +145,7 @@ const eitherTryCatch = f => {
145145
}
146146
```
147147

148-
### [eitherElementsOrErrorsByFunction](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/5b6edeaa62cf134fde7d3d57343bbc639f4fca2e/src/maybe/maybe.js#L240)
148+
### [eitherElementsOrErrorsByFunction](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/ed3a8e45188faf7b970a2643b31433ebb572e789/src/maybe/maybe.js#L239)
149149

150150
Die Funktion `eitherElementsOrErrorsByFunction` nimmt als ersten Parameter eine Funktion und als zweiten Parameter einen Rest Parameter \([JavaScript Rest Parameter](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Functions/rest_parameters)\). Die Funktion die übergeben wird sollte einen Wert entgegen nehmen und ein Either Type zurückgeben. Die Funktion `eitherElementsOrErrorsByFunction` wendet dann die übergebene Funktion auf jeden Wert an der durch den Rest Parameter übergeben wurde. Zurück kommt ein Either. Im Erfolgsfall \(Right\) bekommt der Anwender eine ListMap mit allen "Erfolgs" -Werten. Im Fehlerfall bekommt der Anwender ein Stack mit allen Fehlermeldungen die aufgetreten sind.
151151

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ obsExample = obsExample( removeListener )( listenerExample );
8080
8181
```javascript
8282
let listenerVariable; // undefined
83-
const listenerExample = newListener( nVal => oVal => listenerVariable = nVal );
83+
const lisExample = newListener( nVal => oVal => listenerVariable = nVal );
8484
8585
// create observable and add listener
8686
let obsExample = Observable(42)
87-
(addListener)(listenerExample);
87+
(addListener)(lisExample);
8888
8989
listenerVariable // 42 <- get the value from initialValue
9090
9191
// set new value and update listeners
92-
obsExample = obsExample(setValue)(11);
92+
obsExample = obsExample(setValue)(11)
9393
9494
// receive the update
9595
listenerVariable // 11
@@ -337,7 +337,7 @@ Für den vollen Code: [**observableHttpGetJokeExample.js**](https://github.com/m
337337
Die Titel der Funktionen sind mit einem Link zur Implementation verknüpft.
338338
{% endhint %}
339339
340-
### [Observable](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L41)
340+
### [Observable](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L41)
341341
342342
Die Funktion `Observable` nimmt einen initialen Startwert und erstellt ein Observable.
343343
@@ -352,7 +352,7 @@ const obsExample = Observable(0)
352352
353353
### **Observable-Funktionen**
354354

355-
#### [observableBody](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L25) \(der Kern des Observable\)
355+
#### [observableBody](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L25) \(der Kern des Observable\)
356356

357357
```javascript
358358
// Implementation
@@ -397,7 +397,7 @@ obsExample = obsExample( addListener )( listenerLog ) // hinzufügen nicht mö
397397
```
398398
{% endhint %}
399399

400-
### \*\*\*\*[**addListener**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L95)\*\*\*\*
400+
### \*\*\*\*[**addListener**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L95)\*\*\*\*
401401

402402
Mit der Funktion `addListener` wird dem Observable ein neuer Listener hinzugefügt.
403403

@@ -425,7 +425,7 @@ Das Observable sollte nicht mit mehr als 5'000 Listener verbunden werden, weil a
425425
Mit bis zu 100 Listener und vielen Wertänderungen \(zb. 100'000\) auf einmal hat das Observable kein Problem.
426426
{% endhint %}
427427
428-
### [removeListener](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L156)
428+
### [removeListener](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L156)
429429
430430
Die Funktion `removeListener` entfernt den übergebenen Listener aus dem Observable.
431431
@@ -444,7 +444,7 @@ let obsExample = Observable(0)
444444
obsExample = obsExample(removeListener)( listenerLog );
445445
```
446446
447-
### [removeListenerByKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L125)
447+
### [removeListenerByKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L125)
448448
449449
Die Funktion `removeListenerByKey` entfernt ein Listener aus dem Observable anhand des übergeben Schlüssels.
450450
@@ -463,7 +463,7 @@ let obsExample = Observable(0)
463463
obsExample = obsExample(removeListenerByKey)(42)
464464
```
465465
466-
### \*\*\*\*[**setValue**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L59)\*\*\*\*
466+
### \*\*\*\*[**setValue**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L59)\*\*\*\*
467467
468468
Mit der Funktion `setValue` wird dem Observable ein neuer Wert gegeben. Das Observable informiert danach alle Listener.
469469
@@ -482,7 +482,7 @@ testObs = testObs(setValue)(42)
482482
testObs(getValue) // 42
483483
```
484484
485-
### \*\*\*\*[**getValue**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L80)\*\*\*\*
485+
### \*\*\*\*[**getValue**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L80)\*\*\*\*
486486
487487
Mit der Funktion `getValue` erhält man den aktuellen Wert vom Observable.
488488
@@ -519,7 +519,7 @@ const newListener = listenerFn => pair(generateRandomKey())(listenerFn);
519519
const listenerLog = newListenerWithCustomKey(42)(listenerLogToConsole);
520520
```
521521
522-
### \*\*\*\*[**newListener**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L187)\*\*\*\*
522+
### \*\*\*\*[**newListener**](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L187)\*\*\*\*
523523
524524
Mit der Funktion `newListener` wir ein neuer Listener erstell. Der Key muss im Vergleich zu `newListenerWithCustomKey` nicht angeben werden, weil dieser automatisch generiert wird.
525525
@@ -536,7 +536,7 @@ const listenerLog = newListener(listenerLogToConsole);
536536
Der `generateRandomKey` erzeugt einen String der Länge sechs mit zufälligen Buchstaben \(Gross-/Kleinschreibung\) & Zahlen. Siehe implementation: [generateRandomKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/2f832eda3d66603b5901aaa060baf4e96a514512/src/observable/observableExamples/observableUtilities.js#L11)
537537
{% endhint %}
538538
539-
### [setListenerKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L202)
539+
### [setListenerKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L202)
540540
541541
Mit der Funktion `setListenerKey` wird einem Listener ein neuer Schlüssel zugewiesen.
542542
@@ -550,7 +550,7 @@ let listenerLog = newListener(listenerLogToConsole);
550550
listenerLog = setListenerKey( listenerLog )(42)
551551
```
552552
553-
### [getListenerKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L217)
553+
### [getListenerKey](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L217%20)
554554
555555
Mit der Funktion `getListenerKey` wird der Schlüssel von einem Listener abgefragt.
556556
@@ -568,7 +568,7 @@ getListenerKey( listenerLog ) // 42
568568
569569
## Helferfunktion
570570
571-
### [logListenersToConsole](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/4e0f7b13ae1755088f0a61a916ff28242721ad23/src/observable/observable.js#L226)
571+
### [logListenersToConsole](https://github.com/mattwolf-corporation/ip6_lambda-calculus-in-js/blob/951d8489290b05391cb71abdfed25bb2666aa76c/src/observable/observable.js#L226)
572572
573573
Mit der Funktion `logListenersToConsole` werden die Listener eines Observables auf der JavaScript Konsole ausgegeben.
574574

0 commit comments

Comments
 (0)