Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors "Ilia Ki" "John Michael Hall" "Shigeki Karita" "Sebastian Wilzbach" "And
copyright "2020 Ilia Ki, Kaleidic Associates Advisory Limited, Symmetry Investments"
license "Apache-2.0"

dependency "mir-core" version=">=1.3.5"
dependency "mir-core" version=">=1.5.2"

// dflags "-version=MirNoSIMD"
// dflags "-mtriple=aarch64-linux-gnu"
Expand Down
15 changes: 15 additions & 0 deletions source/mir/algorithm/iteration.d
Original file line number Diff line number Diff line change
Expand Up @@ -4189,6 +4189,21 @@ unittest {
assert(z2.equal!equal(result2));
}

// Ensure filter works with each
version(mir_test)
@safe pure nothrow
unittest {
import mir.ndslice.slice: sliced;

int[] result = [3, 4];

int[] x = [1, 2, 3];
auto y = x.filter!"a >= 2";
y.each!"a++";

assert(y.equal(result));
}

/++
Implements the higher order filter and map function. The predicate and map functions are passed to
`mir.functional.naryFun`, and can either accept a string, or any callable
Expand Down