title: Detecting Pig-Latin In Haskell
body: <p>I've tried to write a function to do this but can't get GHCI to understand my code. I'm coming from an OOP background so functional programming is completely new territory for me.</p>
  
  <pre><code>checkPigLatin :: String -&gt; String
  checkPigLatin sentence (x:xs)
      | check == "true" = "This is Pig Latin"
      | otherwise = "Not Pig Latin"
      where check = if (x `elem` "aeiouAEIOU", '-' `elem` xs, snd(break('a'==) xs) == 'a', snd(break('a'==) xs) == 'y') then "true"
  </code></pre>