DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
deciduously profile image
Ben Lovy

I'm late to the party, catching up one by one!

Haskell:

trimAtBothEnds :: String -> Maybe String
trimAtBothEnds s = if ((length s) <= 2) then Nothing else Just (init.tail $ s)
Forem Open with the Forem app