#MATL , 6 bytes
MATL , 6 bytes
toYs~)
###Explanation
Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Cumulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
#MATL , 6 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Cumulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
MATL , 6 bytes
toYs~)
Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Cumulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
#MATL, 6 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % ComulativeCumulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
#MATL, 6 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Comulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
#MATL, 6 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Cumulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
#MATL, 56 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Comulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index to take element frominto the original array. Implicitly display
#MATL, 5 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry
Ys % Comulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index to take element from the array. Implicitly display
#MATL, 6 bytes
toYs~)
###Explanation
t % Input array implicitly. Duplicate
o % Parity of each entry. Gives 0 for even entries, 1 for odd
Ys % Comulative sum
~ % Logical negate. Gives true for the first run of even entries, and then false
) % Use this as logical index into the original array. Implicitly display
Loading