Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. type Result = [String]
  2.  
  3. pp :: Result -> IO ()
  4. pp x = putStr (concat (map (++"\n") x))
  5.  
  6. strReplace :: String -> Int -> Char -> String
  7. strReplace [] _ _ = []
  8. strReplace (x:xs) i c =
  9. if (i == 0)
  10. then c : strReplace xs (i-1) c
  11. else x : strReplace xs (i-1) c
  12.  
  13. res :: Result
  14. res = [ "8........",
  15. "7........",
  16. "6........",
  17. "5........",
  18. "4........",
  19. "3........",
  20. "2........",
  21. "1........",
  22. " abcdefgh"]
  23.  
  24. chess :: [String] -> [String] -> Result
  25. chess x y =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement