Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import std.stdio;
- import std.array;
- import std.algorithm;
- import std.range;
- void main() {
- int[] arr = [31, 22, -3, 44, 51, 26, 47, 58, 19, 10];
- auto res = arr.enumerate.partition!(t => (t[0] & 1) == 1);
- writeln(res);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement