diff options
author | sternenseemann <sternenseemann@systemli.org> | 2022-10-16 01:32:55 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2022-10-16 14:29:12 +0200 |
commit | d0f2da214badd4cded6fb00e97af4588da49c0d0 (patch) | |
tree | 392762410e636a98331a5eccd25f57a79729dc94 /tests/gc-auto.sh | |
parent | ac0fb38e8a5a25a84fa17704bd31b453211263eb (diff) |
primops: make nature of foldl' strictness clearer
* Clarify the documentation of foldl': That the arguments are forced
before application (?) of `op` is necessarily true. What is important
to stress is that we force every application of `op`, even when the
value turns out to be unused.
* Move the example before the comment about strictness to make it less
confusing: It is a general example and doesn't really showcase anything
about foldl' strictness.
* Add test cases which nail down aspects of foldl' strictness:
* The initial accumulator value is not forced unconditionally.
* Applications of op are forced.
* The list elements are not forced unconditionally.
Diffstat (limited to 'tests/gc-auto.sh')
0 files changed, 0 insertions, 0 deletions