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
  • package kumite
    import "time"
    
    func CheckWorkHours(dateTime time.Time) bool {
    	return dateTime.Weekday() != time.Thursday &&
    		dateTime.Weekday() != time.Sunday &&
    		dateTime.Hour() >= 8 &&
    		dateTime.Hour() < 18
    }
    
    • package kumite
    • import "time"
    • func CheckWorkHours(dateTime time.Time) bool {
    • return true &&
    • dateTime.Weekday() != time.Thursday &&
    • return dateTime.Weekday() != time.Thursday &&
    • dateTime.Weekday() != time.Sunday &&
    • dateTime.Hour() >= 8 &&
    • dateTime.Hour() < 18
    • }
Code
Diff
  • const numMinusSeven = (num) => Math.ceil(num/7);
    • const numMinusSeven = function(num) {
    • let youGoodBro = [];
    • while (num > 0) {
    • num -= 7;
    • youGoodBro.push(num);
    • }
    • return youGoodBro.length;
    • }
    • const numMinusSeven = (num) => Math.ceil(num/7);
Code
Diff
  • fn reverse_compliment(dna: &str) -> String {
        dna.chars()
            .rev()
            .map(|c| match c {
                'A' => 'T',
                'T' => 'A',
                'C' => 'G',
                'G' => 'C',
                _ => panic!("invalid nucleotide")
            })
            .collect()
    }
    
    • def reverse_compliment(dna):
    • pass
    • fn reverse_compliment(dna: &str) -> String {
    • dna.chars()
    • .rev()
    • .map(|c| match c {
    • 'A' => 'T',
    • 'T' => 'A',
    • 'C' => 'G',
    • 'G' => 'C',
    • _ => panic!("invalid nucleotide")
    • })
    • .collect()
    • }
Strings
Code
Diff
  • fn last_char(s: &str) -> char {
        s.chars().last().unwrap()
    }
    • def last_char(str):
    • return str[-1]
    • fn last_char(s: &str) -> char {
    • s.chars().last().unwrap()
    • }
Fundamentals
Strings
Code
Diff
  • fn minutes(n: u32) -> String {
        format!("{}:{:02}", n / 60, n % 60)
    }
    • function minutes(num){
    • return num % 60 < 10 ? Math.floor(num/60) + ':' + '0' + (num % 60) : Math.floor(num/60) + ':' + (num % 60)
    • fn minutes(n: u32) -> String {
    • format!("{}:{:02}", n / 60, n % 60)
    • }
Code
Diff
  • fn bigger_num(a: i32, b: i32) -> i32 {
        a.max(b)
    }
    • public class BiggerNum{
    • public static int compare(int a, int b) {
    • return 0;
    • }
    • fn bigger_num(a: i32, b: i32) -> i32 {
    • a.max(b)
    • }
Code
Diff
  • use std::ops::Add;
    use num::Zero;
    
    fn sum<T, S>(arr: T) -> S where T: IntoIterator<Item = S>, S: Add<Output = S> + Zero {
        let mut sum: S = Zero::zero();
        for i in arr {
            sum = sum + i;
        }
        return sum;
    }
    • def sum(arr):
    • result = 0
    • for i in arr:
    • result += i
    • return result
    • use std::ops::Add;
    • use num::Zero;
    • fn sum<T, S>(arr: T) -> S where T: IntoIterator<Item = S>, S: Add<Output = S> + Zero {
    • let mut sum: S = Zero::zero();
    • for i in arr {
    • sum = sum + i;
    • }
    • return sum;
    • }
Code
Diff
  • fun returnInt(int: Int) = int
    • fun returnInt(int:Int): Int{
    • return int
    • }
    • fun returnInt(int: Int) = int
Code
Diff
  • use std::io::*;
    
    fn kashikashi() -> Result<()> {
        const BUFF: [u8; 7] = [104, 101, 108, 108, 111, 10, 55];
        return stdout().write_all(&BUFF);
    }
    • print("hello")
    • print(2+5)
    • use std::io::*;
    • fn kashikashi() -> Result<()> {
    • const BUFF: [u8; 7] = [104, 101, 108, 108, 111, 10, 55];
    • return stdout().write_all(&BUFF);
    • }
Fundamentals
Strings
Code
Diff
  • fn digest(food: &str) -> String {
        food.chars()
            .map(Into::into)
            .collect::<Vec<String>>()
            .join(" ")
    }
    • def digest(food):
    • return " ".join(food)
    • fn digest(food: &str) -> String {
    • food.chars()
    • .map(Into::into)
    • .collect::<Vec<String>>()
    • .join(" ")
    • }