class Ramda::Internal::Transducers::DropRepeatsWithTransducer
Remove repeats with based on predicate which receives a, b
Public Instance Methods
call(predicate, reducer)
click to toggle source
predicate - fn with 2 arity
# File lib/ramda/internal/transducers/drop_repeats_with_transducer.rb, line 7 def call(predicate, reducer) lambda do |acc, x| if acc.any? && predicate.call(acc.last, x) acc else reducer.call(acc, x) end end end