Repository navigation
Commit 8561d61
committed
Correct the Scan module example and the demuxKvToMap definition
In the Streamly.Data.Scan example, "Scan.compose scan1 scan3" runs scan3
first, so it computed (x^2 + 3x)^2 instead of the stated x^4 + 3x^2.
Swap the arguments and run main in the example to show the output.
The demuxKvToMap definition applied "Fold.lmap snd" to the monadic Maybe
result of the key function instead of to the fold inside it.1 parent 7198634 commit 8561d61
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
883 | | - | |
| 883 | + | |
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
| |||
0 commit comments