T
Trans
How to remove the first occurrence of something?
a=[1,2,3,4]
a.find!{ |e| a==2 } #=> 2
But there is no #find!, how to define it? My solutions seem unduly
complex.
Thanks,
T.
a=[1,2,3,4]
a.find!{ |e| a==2 } #=> 2
But there is no #find!, how to define it? My solutions seem unduly
complex.
Thanks,
T.