Skip to main content
added 29 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 33
  • 88

Haskell, 4745 bytes

-2 bytes thanks to H.PWiz.

(r.g.r=<<).words
g(x:y:z)=' ':y:x:z
r=reverse
((r.g.r)=<<).words

Try it online!Try it online!

Haskell, 47 bytes

g(x:y:z)=' ':y:x:z
r=reverse
((r.g.r)=<<).words

Try it online!

Haskell, 45 bytes

-2 bytes thanks to H.PWiz.

(r.g.r=<<).words
g(x:y:z)=' ':y:x:z
r=reverse

Try it online!

added 36 characters in body
Source Link
totallyhuman
  • 17.3k
  • 3
  • 33
  • 88

Haskell, 5047 bytes

g(x:y:z)=y=' ':y:x:z
reverse.unwordsr=reverse
((r.map g.wordsr)=<<).reversewords

Try it online!Try it online!

Haskell, 50 bytes

g(x:y:z)=y:x:z
reverse.unwords.map g.words.reverse

Try it online!

Haskell, 47 bytes

g(x:y:z)=' ':y:x:z
r=reverse
((r.g.r)=<<).words

Try it online!

Source Link
totallyhuman
  • 17.3k
  • 3
  • 33
  • 88

Haskell, 50 bytes

g(x:y:z)=y:x:z
reverse.unwords.map g.words.reverse

Try it online!