Post History
Haskell, 139 138 bytes import Data.Char f(a:b)|d a=toUpper a:f(dropWhile(\a->e a"-'"||d a)b)|e a":;"=a:c|e a".?!"=' ':c|0<1=c where c=f b;d=isLetter;e=elem f a=a Try it online!
Answer
#2: Post edited
# [Haskell], 139 bytes- <!-- language-all: lang-hs -->
- import Data.Char
f[]=[]- f(a:b)|d a=toUpper a:f(dropWhile(\a->e a"-'"||d a)b)|e a":;"=a:c|e a".?!"=' ':c|0<1=c where c=f b;d=isLetter;e=elem
[Try it online!][TIO-kti5j83m]- [Haskell]: https://www.haskell.org/
[TIO-kti5j83m]: https://tio.run/##HY9Ba4NAFITv@yueUjABI@0x2q2HFNpAjy05pDk83Wd3ybpPdlckkP9uNbeZ4YOZ0RiuZO08m35gH@EdIxYHjV5054s8X0S3wbLZ3hWgjPwzDOQBy26jPA8nbSxtfnH3RoDpLkvvK7Zd6NWXVSqxbB@6qJNUZpAt9vn1RbYwafIEreygqZQ04YtiJF@RJEv93KNxIMG4JcM2whOMzhpHoehxgK546Plz2c05nNhblYgDOrjxCD1eCfqlFAI6NZlW10Lfltk7R2P0xrH4ZgbL7q8CZZTLInhCJY4Q4qgMqRwUr@nE3t8KOMJkrIUBQyjESWOs6zqpE/FBce3Z76HhGC0F4OUNkc@h8Zz8Aw "Haskell – Try It Online"
- # [Haskell], <del>139</del> 138 bytes
- <!-- language-all: lang-hs -->
- import Data.Char
- f(a:b)|d a=toUpper a:f(dropWhile(\a->e a"-'"||d a)b)|e a":;"=a:c|e a".?!"=' ':c|0<1=c where c=f b;d=isLetter;e=elem
- f a=a
- [Try it online!][TIO-ktjzpupv]
- [Haskell]: https://www.haskell.org/
- [TIO-ktjzpupv]: https://tio.run/##HY/BasMwEETv@oq1KTgBx7TH2FV9SKEN9NiSSy9ra12JyFojyZhA/t2Vc5vZHXgzGsOVrF1XM07sI7xjxOqk0Ythh3W3vytAGflnmsgD1sNOeZ4u2lja/eLhjQDzQ5Hft9g@pTdfN7nEun/oqs1yWUCR7PPri@xh0eQJejlA1yhpwhfFSL4hSZZGMSQYriMaBxKMSx/sIzzB7KxxFKoRJxiqh14/U20u4cLeqkyc0MGNZxjxSjAmNAR0ajG9boW@pfIHR3P0xrH4ZgbL7q8BZZQrInhCJc4Q4qwMqRIUb9eFvb9VcIbFWAsThlCJi8bYtm3WZuKD4sY5HqHjGC0F4LSJyJfQec7@AQ "Haskell – Try It Online"
#1: Initial revision
# [Haskell], 139 bytes <!-- language-all: lang-hs --> import Data.Char f[]=[] f(a:b)|d a=toUpper a:f(dropWhile(\a->e a"-'"||d a)b)|e a":;"=a:c|e a".?!"=' ':c|0<1=c where c=f b;d=isLetter;e=elem [Try it online!][TIO-kti5j83m] [Haskell]: https://www.haskell.org/ [TIO-kti5j83m]: https://tio.run/##HY9Ba4NAFITv@yueUjABI@0x2q2HFNpAjy05pDk83Wd3ybpPdlckkP9uNbeZ4YOZ0RiuZO08m35gH@EdIxYHjV5054s8X0S3wbLZ3hWgjPwzDOQBy26jPA8nbSxtfnH3RoDpLkvvK7Zd6NWXVSqxbB@6qJNUZpAt9vn1RbYwafIEreygqZQ04YtiJF@RJEv93KNxIMG4JcM2whOMzhpHoehxgK546Plz2c05nNhblYgDOrjxCD1eCfqlFAI6NZlW10Lfltk7R2P0xrH4ZgbL7q8CZZTLInhCJY4Q4qgMqRwUr@nE3t8KOMJkrIUBQyjESWOs6zqpE/FBce3Z76HhGC0F4OUNkc@h8Zz8Aw "Haskell – Try It Online"