Post History
Haskell, 40 bytes f((h:t):r)=h:f(r++[t]) f(_:r)=f r f _=[] Try it online!
Answer
#8: Post edited
- # [Haskell], 40 bytes
- ```haskell
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- ```
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
[TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"(Dunno what's going on with the syntax highlighting)
- # [Haskell], 40 bytes
- ```haskell
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- ```
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
#7: Post edited
- # [Haskell], 40 bytes
<!-- language-all: lang-hs -->f((h:t):r)=h:f(r++[t])f(_:r)=f rf _=[]- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- (Dunno what's going on with the syntax highlighting)
- # [Haskell], 40 bytes
- ```haskell
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- ```
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- (Dunno what's going on with the syntax highlighting)
#6: Post edited
- # [Haskell], 40 bytes
- <!-- language-all: lang-hs -->
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
[TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- # [Haskell], 40 bytes
- <!-- language-all: lang-hs -->
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- (Dunno what's going on with the syntax highlighting)
#5: Post edited
- # [Haskell], 40 bytes
<!-- language-all: lang-python -->- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- # [Haskell], 40 bytes
- <!-- language-all: lang-hs -->
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
#4: Post edited
- # [Haskell], 40 bytes
<!-- language-all: lang-none -->- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- # [Haskell], 40 bytes
- <!-- language-all: lang-python -->
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
#3: Post edited
- # [Haskell], 40 bytes
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- # [Haskell], 40 bytes
- <!-- language-all: lang-none -->
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
#2: Post edited
- # [Haskell], 40 bytes
<!-- language-all: lang-hs -->- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
- # [Haskell], 40 bytes
- f((h:t):r)=h:f(r++[t])
- f(_:r)=f r
- f _=[]
- [Try it online!][TIO-khu8sfl0]
- [Haskell]: https://www.haskell.org/
- [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"
#1: Initial revision
# [Haskell], 40 bytes <!-- language-all: lang-hs --> f((h:t):r)=h:f(r++[t]) f(_:r)=f r f _=[] [Try it online!][TIO-khu8sfl0] [Haskell]: https://www.haskell.org/ [TIO-khu8sfl0]: https://tio.run/##JY7BCsIwEETv/YoleGix/kChB1HBg6IHbyGUJU2aYJqENIr@vDFtYQ/zZgZ2FE5PYUxKsixVE6smVK1qZBm2WxpZVciymy0JoZDQtZSlKKY4QQuUkqe2jtSEaytGzGJ0by0IqynhrhfZGJyRC591pnwPJcLaOH28QYtRO7vw8YvGDbC/X3Lt8DJRv9ewJrfAFYaeMFYUI2qbn4/or@CDthE2M4CEZVf6cWlwmNKOe/8H "Haskell – Try It Online"