26 Commits

Author SHA1 Message Date
5453c646f6
Replace Variant with SumType 2022-06-06 09:46:45 +02:00
cfcb1e727a
Fix foldr scope 2022-05-30 05:43:08 +02:00
938a1bb5b4
Replace short preconditions in the main package 2021-05-25 09:03:00 +02:00
b62cbb0647
Use std searching and iteration 2021-05-16 07:52:46 +02:00
92284c8541
Replace Option with Nullable 2021-03-27 10:28:49 +01:00
f27f62b80a
Fix InputRanges for non-copyable elements 2021-03-11 10:18:02 +01:00
3ce5e8153c Update copyrights 2020-05-05 07:46:10 +02:00
0a973b46ba Add algorithm.iteration.foldr 2019-04-24 06:53:08 +02:00
76bda0ac8d Add getAndPopFront()/getAndPopBack() 2019-04-17 06:27:18 +02:00
f214f3baa2 Add algorithm.iteration.foldl 2019-04-16 07:20:52 +02:00
f66935f40d Build with -dip1000. Fix #85 2019-04-15 07:05:56 +02:00
Nathan Sashihara
10afe47bae In tanya.algorithm.iteration.take & retro preserve const/inout for empty/front/etc. 2019-03-23 23:41:20 -04:00
0fe7308a22 algorithm: import searching publically 2019-03-20 07:30:47 +01:00
484cb13317 Separate non-documentation tests from the code 2019-03-19 07:45:52 +01:00
5ab99cf887 Move memory functions into memory.lifecycle
- move
- moveEmplace
- forward
- emplace
- swap
2019-03-17 10:56:44 +01:00
8fd0452cd0 algorithm.iteration: Add singleton()
... iterating over a single value.
2019-02-25 09:27:03 +01:00
Nathan Sashihara
ff7d20f167 retro supports slicing if source range supports slicing 2019-01-08 20:19:53 -05:00
e67a05138e range.primitive: Support non copyable elements
... in all ranges.
2018-11-19 21:37:58 +01:00
7585bf59e7 Add test.stub. Fix #51 2018-11-18 06:32:10 +01:00
0a121d9d19 Disable length when taking from a lengthless range
Fix #79.
2018-11-13 08:29:51 +01:00
3c8f6e3435 Merge remote-tracking branch 'n8sh/take-slice' 2018-11-07 07:08:52 +01:00
ee8b7ef719 Merge remote-tracking branch 'retro-retro' 2018-11-06 16:59:57 +01:00
Nathan Sashihara
6b22cd60df take(take(range,...),n) is take(range, n) and use slicing in take like in takeExactly
Also take!R is the same as takeExactly!R when isInfinite!R.
2018-11-05 22:49:10 -05:00
Nathan Sashihara
c290c85088 retro(retro(range)) is range 2018-11-05 18:43:58 -05:00
c5eb2f27be Add algorithm.iteration 2018-09-28 05:40:33 +02:00
94c7fd2231 Move range.adapter to algorithms + take() bugfixes
A lot of algorithms like lazy sort() can be also classified as adapters
since it wraps the original range and allows to access the elements of
the range in a particular order. The only reason why take() was in
range.adapter is that take() is trivial - it doesn't change the order of
elements but can turn an infinite range into finite one. This
distinction between trivial and non-trivial algorithms isn't absolutely
clear. So let us put all algorithms and any adapters that change the
range iteration in some way into "algorithm" package to avoid any
confusion later.

- range.adapter is renamed into algorithm.iteration
- range.adapter is deprecated
- Added missing imports for take() and takeExactly()
- takeExactly() doesn't wrap ranges that have slicing anymore
- Voldemort structs for take() takeExactly() are now static
2018-09-06 12:50:42 +02:00