Say I wrote a code :-
input = ['a','b','b','b','a','a','b','c','c']
prev = 0
output = input.slice_before do |e|
input[prev = prev + 1] != e
end.to_a
p output
Now when I will run - !ruby %, I want the output to come to a new separate buffer in the same tab. how to do the same ?
Regards,
Arup Rakshit
Arup Rakshit
No comments:
Post a Comment