-- http://www.codewars.com/kata/54da539698b8a2ad76000228
module Codewars.Kata.TenMinuteWalk where

isValidWalk :: String -> Bool
isValidWalk walk = not (null w') && null w'' && f 'n' == f 's' && f 'e' == f 'w' where
  w'      = drop 9 walk
  (_:w'') = w'
  f ch    = length $ filter (==ch) walk
