# File lib/needle/pipeline/collection.rb, line 120 def chain_to( block ) head = tail = nil @elements.sort.reverse.each do |el| if head tail.succ = el tail = el else # first time through... head = tail = el end end if tail tail.succ = block return head else return block end end