<commit_before># LiveScript
is a fork of [Coco](http://satyr.github.com/coco/), which is in turn derived from [CoffeeScript](http://coffeescript.org/). Like those two it compiles down to JavaScript, with the goal of having a straightforward mapping to JavaScript. LiveScript aims for increased code beauty, less typing, and an easier transition from CoffeeScript, in comparison to Coco. LiveScript is not currently ready for production use, as it is still developing and changing often.

Checkout [gkz.github.com/LiveScript](http://gkz.github.com/LiveScript/).
## Overview
### Examples
#### Example 1
LiveScript:

    take(n, [x, ...xs]:list) =
      | n <= 0       => []
      | !list.length => []
      | otherwise    => x & take n - 1, xs

    take 2, [1 2 3 4 5] #=> [1, 2]

Compiled JavaScript:   

    var take, __slice = [].slice;
    take = function(n, list){
      var x, xs;
      x = list[0], xs = __slice.call(list, 1);
      switch (false) {
      case !(n <= 0):
        return [];
      case !!list.length:
        return [];
      default:
        return [(x)].concat(take(n - 1, xs));
      }
    };
    take(2, [1, 2, 3, 4, 5]); //=> [1, 2]

#### Example 2
LiveScript:

    times = (x, y) --> x * y
    
    timesTwo = times 2
    
    timesTwo 4 #=> 8

Compiled JavaScript:

    var times, timesTwo;
    times = __curry(function(x, y){
      return x * y;
    });
    timesTwo = times(2);
    timesTwo(4); //=> 8
    
    function __curry(func){
      __slice = [].slice
      return function(){
        var params;
        params = __slice.call(arguments);
        if (params.length === func.length) {
          return func.apply(null, params);
        } else {
          return function(){
            var ps;
            ps = __slice.call(arguments);
            return func.apply(null, __slice.call(params).concat(__slice.call(ps)));
          };
        }<commit_msg>updated example 2 compiled js<commit_after># LiveScript
is a fork of [Coco](http://satyr.github.com/coco/), which is in turn derived from [CoffeeScript](http://coffeescript.org/). Like those two it compiles down to JavaScript, with the goal of having a straightforward mapping to JavaScript. LiveScript aims for increased code beauty, less typing, and an easier transition from CoffeeScript, in comparison to Coco. LiveScript is not currently ready for production use, as it is still developing and changing often.

Checkout [gkz.github.com/LiveScript](http://gkz.github.com/LiveScript/).
## Overview
### Examples
#### Example 1
LiveScript:

    take(n, [x, ...xs]:list) =
      | n <= 0       => []
      | !list.length => []
      | otherwise    => x & take n - 1, xs

    take 2, [1 2 3 4 5] #=> [1, 2]

Compiled JavaScript:   

    var take, __slice = [].slice;
    take = function(n, list){
      var x, xs;
      x = list[0], xs = __slice.call(list, 1);
      switch (false) {
      case !(n <= 0):
        return [];
      case !!list.length:
        return [];
      default:
        return [(x)].concat(take(n - 1, xs));
      }
    };
    take(2, [1, 2, 3, 4, 5]); //=> [1, 2]

#### Example 2
LiveScript:

    times = (x, y) --> x * y
    
    timesTwo = times 2
    
    timesTwo 4 #=> 8

Compiled JavaScript:

    var times, timesTwo;
    times = __curry(function(x, y){
      return x * y;
    });
    timesTwo = times(2);
    timesTwo(4); //=> 8
    
    function __curry(func){
      var __slice = [].slice;
      return function(){
        var params = __slice.call(arguments),
            f;
        if (params.length >= func.length) {
          return func.apply(null, params);
        } else {
          return f = function(){
            params = params.concat(__slice.call(arguments));
            if (params.length >= func.length) {
              return func.apply(null, params);
            } else {
              return f;
            }    
          };
        }
{'fraction_non_alphanumeric': 0.14259927797833935, 'fraction_numerical': 0.015729757607013926, 'mean_word_length': 2.1206757843925987, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1384448', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1187, 'n_words': 386}