Start a new Kumite
AllAgda (Beta)BF (Beta)CCFML (Beta)ClojureCOBOL (Beta)CoffeeScriptCommonLisp (Beta)CoqC++CrystalC#D (Beta)DartElixirElm (Beta)Erlang (Beta)Factor (Beta)Forth (Beta)Fortran (Beta)F#GoGroovyHaskellHaxe (Beta)Idris (Beta)JavaJavaScriptJulia (Beta)Kotlinλ Calculus (Beta)LeanLuaNASMNim (Beta)Objective-C (Beta)OCaml (Beta)Pascal (Beta)Perl (Beta)PHPPowerShell (Beta)Prolog (Beta)PureScript (Beta)PythonR (Beta)RacketRaku (Beta)Reason (Beta)RISC-V (Beta)RubyRustScalaShellSolidity (Beta)SQLSwiftTypeScriptVB (Beta)
Show only mine

Kumite (ko͞omiˌtā) is the practice of taking techniques learned from Kata and applying them through the act of freestyle sparring.

You can create a new kumite by providing some initial code and optionally some test cases. From there other warriors can spar with you, by enhancing, refactoring and translating your code. There is no limit to how many warriors you can spar with.

A great use for kumite is to begin an idea for a kata as one. You can collaborate with other code warriors until you have it right, then you can convert it to a kata.

Ad
Ad
Code
Diff
  • #include <string>
    #include <numeric>
    
    bool verify_sum(const std::string& a, const std::string& b) {
      int x = a.size(), y = b.size();
      return x && y ? std::accumulate(a.begin(), a.end(), 0) == std::accumulate(b.begin(), b.end(), 0) : x == y;
    }
    • #include <string>
    • #include <numeric>
    • bool verify_sum(const std::string& a, const std::string& b) {
    • return std::accumulate(a.begin(), a.end(), 0) == std::accumulate(b.begin(), b.end(), 0);
    • int x = a.size(), y = b.size();
    • return x && y ? std::accumulate(a.begin(), a.end(), 0) == std::accumulate(b.begin(), b.end(), 0) : x == y;
    • }

Less lines. ;)

WARNING:

head = None

if no arguments supplied =>

list(map(str, head))

=>

TypeError: 'NoneType' object is not iterable

┬─┬ノ( º _ ºノ)

Code
Diff
  • head = ["***", "Numbler =>", 40, 'another', "last"]
    body = [
        [1,   "B", "C", 2, 3],
        ["D", "E", "F", 4, 5]
    ]
    
    t = table(body, head = head)
    • head = ["***", "Numbler =>", 40, 'another', "last"]
    • body = [
    • [ 1 , "B", "C", 2, 3],
    • [1, "B", "C", 2, 3],
    • ["D", "E", "F", 4, 5]
    • ]
    • t = table(body, head=head)
    • t = table(body, head = head)

syntax in es6 more legible

Code
Diff
  • returnhundred = () => parseInt("10" + 0)
    • returnhundred=_=> parseInt("10" + 0)
    • returnhundred = () => parseInt("10" + 0)
Code
Diff
  • switchout = str.replace
    • def switchout(sentence, word, switch):
    • return sentence.replace(word, switch)
    • switchout = str.replace