• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
EdThePro Avatar
Name:Edwin Pratt
Clan:Unknown
Skills:haskell, racket, c++, c, javascript
Member Since:Mar 2019
Last Seen:Feb 2021
Profiles:
Following:1
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (4)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • hyperrealgopher
    • commented on "Array.diff" haskell solution
    • 4 years ago

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
    • tko
    • commented on "Find the odd int" haskell solution
    • 5 years ago

    Getting odds and evens swapped? Your list has 2,3,4,5,6 appearing odd number of times, the kata states there will be exactly one that appears an odd number of times. And yes, this trick only works if the input follows the rule.

  • Custom User Avatar
    • natan
    • commented on "Are they the "same"?" kata
    • 5 years ago

    Haskell, right? So it's not as straight-forward as just "printing" because we're outside IO, we have to resort to unsafePerformIO .. but there exists a module to help us out a bit. Example:

    module Codewars.Kata.Compare where
    
    import Debug.Trace
    
    comp :: [Integer] -> [Integer] -> Bool
    comp as bs = traceShow (as, bs) $ as == bs
    
    -- without trace:
    -- comp as bs = as == bs
    
  • Custom User Avatar
    • hobovsky
    • commented on "Are they the "same"?" kata
    • 5 years ago

    You can check it yourself: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#how-can-i-see-which-input-causes-my-solution-to-fail

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...