On Saturday, May 3, 2025 12:08:45 PM Mountain Daylight Time Ali Çehreli via
Digitalmars-d-learn wrote:
> On 5/2/25 2:44 PM, Python wrote:
> > On Friday, 2 May 2025 at 14:33:57 UTC, Richard (Rikki) Andrew Cattermole
> > wrote:
> >> Have you tried filter?
> >>
> >> https://dlang.org/phobos/std_
On 5/2/25 2:44 PM, Python wrote:
> On Friday, 2 May 2025 at 14:33:57 UTC, Richard (Rikki) Andrew Cattermole
> wrote:
>> Have you tried filter?
>>
>> https://dlang.org/phobos/std_algorithm_iteration.html#.filter
>
> Thx. Anyway, what find returns aftrr first occurrence is unexpected.
Yes, understa
On Friday, 2 May 2025 at 14:33:57 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Have you tried filter?
https://dlang.org/phobos/std_algorithm_iteration.html#.filter
Thx. Anyway, what find returns aftrr first occurrence is
unexpected.
On Friday, 2 May 2025 at 14:32:04 UTC, Python wrote:
I am trying to get some items from a list, but `find` gives me
unexpected results.
```
import std.stdio;
import std.algorithm;
int[] x = [1, 2, 3, 4, 5, 1, 2, 3];
void main()
{
auto selection = x.find!(a => a == 2);
foreach(item;se
Have you tried filter?
https://dlang.org/phobos/std_algorithm_iteration.html#.filter
I am trying to get some items from a list, but `find` gives me
unexpected results.
```
import std.stdio;
import std.algorithm;
int[] x = [1, 2, 3, 4, 5, 1, 2, 3];
void main()
{
auto selection = x.find!(a => a == 2);
foreach(item;selection)
{
writeln(item);
}
}
```
Out