Begin a new Kumite
Search
About
  • Filter by Language:
  • 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.

Code
Diff
  • console.log("Hello, TypeScript");
  • 1-#!/bin/bash
    2-STR="Hello Bash!"
    3-echo $STR
    1+console.log("Hello, TypeScript");
Arrays

Some simple array extensions to make it easier to calculate the sum and mean values of an array's contents. A block can optionally be passed in which should return the value
to be summed/averaged.

class Array
  def sum(&block)
    inject(0) do |result, item|
      item = block_given? ? yield(item) : item
      result + (item || 0)
    end
  end
  
  def mean(&block)
    sum(&block).to_f / size
  end
end