Post History
Ruby, 34 29 bytes ->s,n{s.chars.map{_1*n}*""} Try it online!
Answer
#2: Post edited
# [Ruby], 34 bytes- ```ruby
->s,n{s.chars.reduce(""){_1+_2*n}}- ```
[Try it online!][TIO-ktdirtua]- [Ruby]: https://www.ruby-lang.org/
[TIO-ktdirtua]: https://tio.run/##KypNqvyfZvtf165YJ6@6WC85I7GoWK8oNaU0OVVDSUmzuiZRJ7kmUTtZK6@29n9BaUmxQpqehlJiUnJKqpKOkeZ/AA "Ruby – Try It Online"
- # [Ruby], <del>34</del> 29 bytes
- ```ruby
- ->s,n{s.chars.map{_1*n}*""}
- ```
- [Try it online!][TIO-ktdlo7ip]
- [Ruby]: https://www.ruby-lang.org/
- [TIO-ktdlo7ip]: https://tio.run/##KypNqvyfZvtf165YJ6@6WC85I7GoWC83saC6JrkmWSuvVktJqfZ/QWlJsUKanoZSYlJySqqSjqnmfwA "Ruby – Try It Online"
#1: Initial revision
# [Ruby], 34 bytes ```ruby ->s,n{s.chars.reduce(""){_1+_2*n}} ``` [Try it online!][TIO-ktdirtua] [Ruby]: https://www.ruby-lang.org/ [TIO-ktdirtua]: https://tio.run/##KypNqvyfZvtf165YJ6@6WC85I7GoWK8oNaU0OVVDSUmzuiZRJ7kmUTtZK6@29n9BaUmxQpqehlJiUnJKqpKOkeZ/AA "Ruby – Try It Online"