Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. expand :: FileContents -> FileContents -> FileContents
  2. expand [] []
  3.   = []
  4. expand x []
  5.   = x
  6. expand x defFile
  7.   =  
  8.   where
  9.     (u, v)     = splitText separators x
  10.     (_, n)     = splitText "\n" defFile
  11.     g          = getKeywordDefs n
  12.     wordList   = combine u v
  13.    
  14.  
  15.  
  16. -- You may wish to uncomment and implement this helper function
  17. -- when implementing expand
  18. replaceWord :: String -> KeywordDefs -> String
  19. replaceWord search keyWords
  20.   = x
  21.   where
  22.     (x : _) = lookUp search keyWords
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement