module Answers::Issue20260209::FlatReversePartition
Refinements by fpsvogel
Public Instance Methods
Source
# File answers/20260209.rb, line 33 def flat_reverse_partition(el) sort_by { (it == el) ? 1 : 0 } end
Source
# File answers/20260209.rb, line 37 def flat_reverse_partition!(el) sort_by! { (it == el) ? 1 : 0 } end