functional.rb: extend % operator for partial apply and array fix