Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. bubbleSort xs =
  2. mapReduce
  3. (\xs -> head xs)
  4. (\xs -> tail xs)
  5. (\xs -> null xs)
  6. (\xs -> [])
  7. (bubble)
  8. xs
  9.  
  10. Error message
  11.  
  12.  
  13. Problem5.hs:33:4:
  14.  
  15. Couldn't match expected type `[a] -> [a]'
  16.  
  17. against inferred type `[a1]'
  18.  
  19. In the fifth argument of `mapReduce', namely `(bubble)'
  20.  
  21. In the expression:
  22.  
  23. mapReduce
  24.  
  25. (\ xs -> head xs)
  26.  
  27. (\ xs -> tail xs)
  28.  
  29. (\ xs -> null xs)
  30.  
  31. (\ xs -> [])
  32.  
  33. (bubble)
  34.  
  35. xs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement