summaryrefslogtreecommitdiffstats
path: root/tests/012/seq.tl
Commit message (Collapse)AuthorAgeFilesLines
* lib: rmismatch tests and bugfix.Kaz Kylheku2021-06-221-0/+39
| | | | | | | * lib.c (rmismatch): when left is an empty string or vector, and right is nil: we must return -1 not zero. * tests/012/seq.tl: More rmismatch tests.
* lib: optimize mismatch, rmismatch for strings.Kaz Kylheku2021-06-221-0/+49
| | | | | | | | | | | * lib (mismatch, rmismatch): If the arguments are strings or literals, other than lazy strings, keyfun is identity, and equality is by character identity, the operation can be done with an efficient loop over the wchar_t strings. * tests/012/seq.tl: Tests for string case of mismatch, via starts-with function. Test mismatch via ends-with, and also directly for vectors and strings.
* reduce-left: rewrite using seq_iter.Kaz Kylheku2021-06-091-0/+10
| | | | | | | * lib.c (reduce_left): Use sequence iteration instead of list operations. * txr.1: Add a note to the documentation.
* window-map: add tests, improve doc, add examples.Kaz Kylheku2021-05-251-0/+19
| | | | | | | * tests/012/seq.tl: New tests. * txr.1: Improve documentation of window-map's :wrap and :reflect. Add examples.
* window-map: broken :wrap and :reflect.Kaz Kylheku2021-05-251-0/+33
| | | | | | | | | | | * lib.c (window_map_list): Rewrite :wrap and :reflect support. The main issue with these is that they only sample items from the front of the input list and generate both flanks of the boundary from that prefix; :reflect is additionaly buggy due to applying nreverse to a sub which can return the original sequence. * tests/012/seq.tl: Some test coverage for window-map.
* mapcar: add test covering recent regression.Kaz Kylheku2021-01-181-0/+3
| | | | | * test/012/seq.tl: New test with multiple lambda arguments and variadic function.
* tests: add tests for list-builder and fix bug.Kaz Kylheku2019-09-101-0/+10
| | | | | | | * share/txr/stdlib/build.tl (list-buider pend*): Fix typo: apply should be append. Funny, this didn't propagate to ncon*. * tests/012/seq.tl: Some list-builder tests via build macro.
* New tests for sequence manipulation.Kaz Kylheku2019-09-091-0/+9
Just a few append cases with improper lists here to start with. * tests/012/seq.tl: New file. * tests/012/seq.expected: New file