title: Finding the shortest and longest word of a string in Haskell
body: <p>I am trying to find the shortest and longest word in a given string. If the entered string is "house tap mobile telephone" then the longest word should be telephone and shortest will be tap. I have already written the following functions. How do i find the index of the strings and find the shortest and longest word out of it? </p>
  
  <pre><code>---------Converting string into a list of strings and finding length of each word--------
  
  stringConvert :: String -&gt; [Int]
  stringConvert x = map (length) (words x)
  
  ----------Find the longest word-----------
  
  findLongestWord :: String -&gt; Int
  findLongestWord x = maximum(stringConvert x)
  
  ----------Find the shortest word-----------
  
  findShortestWord :: String -&gt; Int
  findShortestWord x = minimum(stringConvert x)
  </code></pre>