Post History
Haskell, 20 bytes f x=foldl((+).(x*))0 Try it online! Takes input coefficients from highest degree to lowest. 21 bytes x%(h:t)=h+x*x%t x%_=0 Try it online!
Answer
#3: Post edited
- # [Haskell], 20 bytes
- <!-- language-all: lang-hs -->
- f x=foldl((+).(x*))0
- [Try it online!][TIO-khgv6t15]
- [Haskell]: https://www.haskell.org/
- [TIO-khgv6t15]: https://tio.run/##y0gszk7Nyfn/P02hwjYtPyclR0NDW1NPo0JLU9Pgf25iZp6CrUJBUWZeiYKKQpqCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
- **21 bytes**
- <!-- language-all: lang-hs -->
- x%(h:t)=h+x*x%t
- x%_=0
- [Try it online!][TIO-khgv8gyo]
- [Haskell]: https://www.haskell.org/
- [TIO-khgv8gyo]: https://tio.run/##y0gszk7Nyfn/v0JVI8OqRNM2Q7tCq0K1hKtCNd7W4H9uYmaegq1CQVFmXomCioKGqqaCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
- # [Haskell], 20 bytes
- <!-- language-all: lang-hs -->
- f x=foldl((+).(x*))0
- [Try it online!][TIO-khgv6t15]
- [Haskell]: https://www.haskell.org/
- [TIO-khgv6t15]: https://tio.run/##y0gszk7Nyfn/P02hwjYtPyclR0NDW1NPo0JLU9Pgf25iZp6CrUJBUWZeiYKKQpqCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
- Takes input coefficients from highest degree to lowest.
- **21 bytes**
- <!-- language-all: lang-hs -->
- x%(h:t)=h+x*x%t
- x%_=0
- [Try it online!][TIO-khgv8gyo]
- [Haskell]: https://www.haskell.org/
- [TIO-khgv8gyo]: https://tio.run/##y0gszk7Nyfn/v0JVI8OqRNM2Q7tCq0K1hKtCNd7W4H9uYmaegq1CQVFmXomCioKGqqaCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
#2: Post edited
- # [Haskell], 20 bytes
- <!-- language-all: lang-hs -->
- f x=foldl((+).(x*))0
- [Try it online!][TIO-khgv6t15]
- [Haskell]: https://www.haskell.org/
[TIO-khgv6t15]: https://tio.run/##y0gszk7Nyfn/P02hwjYtPyclR0NDW1NPo0JLU9Pgf25iZp6CrUJBUWZeiYKKQpqCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
- # [Haskell], 20 bytes
- <!-- language-all: lang-hs -->
- f x=foldl((+).(x*))0
- [Try it online!][TIO-khgv6t15]
- [Haskell]: https://www.haskell.org/
- [TIO-khgv6t15]: https://tio.run/##y0gszk7Nyfn/P02hwjYtPyclR0NDW1NPo0JLU9Pgf25iZp6CrUJBUWZeiYKKQpqCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
- **21 bytes**
- <!-- language-all: lang-hs -->
- x%(h:t)=h+x*x%t
- x%_=0
- [Try it online!][TIO-khgv8gyo]
- [Haskell]: https://www.haskell.org/
- [TIO-khgv8gyo]: https://tio.run/##y0gszk7Nyfn/v0JVI8OqRNM2Q7tCq0K1hKtCNd7W4H9uYmaegq1CQVFmXomCioKGqqaCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"
#1: Initial revision
# [Haskell], 20 bytes <!-- language-all: lang-hs --> f x=foldl((+).(x*))0 [Try it online!][TIO-khgv6t15] [Haskell]: https://www.haskell.org/ [TIO-khgv6t15]: https://tio.run/##y0gszk7Nyfn/P02hwjYtPyclR0NDW1NPo0JLU9Pgf25iZp6CrUJBUWZeiYKKQpqCoYFCtKGOkY6xjkns/3/JaTmJ6cX/dZMLCgA "Haskell – Try It Online"