Post History
Ruby, 50 bytes def f(k,x)k.length>1?k[0]+f(k[1..-1],x)*x:k[-1]end Try it online! This uses the Horner's method recursively, because I think it'll be slightly shorter than using a loop or bu...
Answer
#1: Initial revision
# Ruby, 50 bytes ```ruby def f(k,x)k.length>1?k[0]+f(k[1..-1],x)*x:k[-1]end ``` [Try it online!](https://tio.run/##KypNqvz/PyU1TSFNI1unQjNbLyc1L70kw87QPjvaIFYbKBptqKenaxgLlNSqsMqOBjJT81L@F5SWFAP1ACUNYnUUDC2MNLmQhHQUjMDiJghRIz1TmKiBnimmah0FYxBhAjEPqOI/AA "Ruby – Try It Online") This uses the [Horner's method](https://en.wikipedia.org/wiki/Horner%27s_method) recursively, because I think it'll be slightly shorter than using a loop or builtin array functions. Also, this is my first post on this website ... er my first real attempt at golfing something in Ruby, so please feel free to suggest ways to shorten my solution.