-- Help the fruit guy
-- 

module Codewars.Kata.Fruits where

import Data.Maybe(fromMaybe)
import Data.Char(toLower)
import Data.List (stripPrefix)

removeRotten :: [String] -> [String]
removeRotten = map ((\ f -> fromMaybe f . stripPrefix "rotten" $ f) . map toLower)

 Help the fruit guy
 

module Codewars.Kata.Fruits where

import Data.Maybe(fromMaybe)
import Data.Char(toLower)
import Data.List (stripPrefix)

removeRotten :: [String] -> [String]
removeRotten = map ((\ f -> fromMaybe f . stripPrefix "rotten" $ f) . map toLower)
