Class: GradeUp

Inherits:
Op
  • Object
show all
Defined in:
lib/jop.rb

Constant Summary collapse

REP =
'/:'

Instance Method Summary collapse

Methods inherited from Op

#apply_monad_deep, #integer_args, #numeric_literal?, #to_numeric

Instance Method Details

#run(ary, interpreter) ⇒ Object



102
103
104
# File 'lib/jop.rb', line 102

def run ary, interpreter
  ary.zip(0...ary.length).sort_by {|e| e[0] }.map {|e| e[1] }
end