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
Fundamentals
Strings
Code
Diff
  • digest = lambda food: ''.join([f'{letter} ' for letter in food]).rstrip()
    • def digest(food):
    • return " ".join(food)
    • digest = lambda food: ''.join([f'{letter} ' for letter in food]).rstrip()
Code
Diff
  • def factorial(n):
        return 1 if n == 0 else eval('*'.join([str(i) for i in range(1, n+1)]))
    • factorial=n=>(x=1,[...{*[Symbol.iterator](){for(i=2;i<=n;i++)yield x*=i}}],x)
    • def factorial(n):
    • return 1 if n == 0 else eval('*'.join([str(i) for i in range(1, n+1)]))
Code
Diff
  • upper_case = lambda s: s.lower().swapcase()
    
    • pub fn make_uppercase(s: String) -> String {
    • s.to_uppercase()
    • }
    • upper_case = lambda s: s.lower().swapcase()
Code
Diff
  • is_divisible = lambda n, x, y: all([n % i == 0 for i in [x, y]])
    • is_divisible = lambda n, x, y: not n%x + n%y
    • is_divisible = lambda n, x, y: all([n % i == 0 for i in [x, y]])
Code
Diff
  • is_equal = lambda a, b: {0: 'no', 1: 'yes'}[a == b]
    • is_equal=lambda a,b: ['yes', 'no'][bool(a) ^ bool(b)]
    • is_equal = lambda a, b: {0: 'no', 1: 'yes'}[a == b]
Fundamentals
Code
Diff
  • def hello_message():
        msg = 'Hello World!'
        return msg
    
    
        
    • fun main() = print("Hi")
    • def hello_message():
    • msg = 'Hello World!'
    • return msg
Fundamentals
Code
Diff
  • def is_even(n):
        return n ^ 1 == n + 1
    • def is_even(n):
    • return n & 1 == 0
    • return n ^ 1 == n + 1