<commit_before># fn
Yes, Yet another functional library toolkit. This is just a collection of functional programming tools that I have used have been useful for me.

![fn build status](https://travis-ci.org/g-i-o-/fn.svg)
32
1 ## bind
Wraps a given function within a bound function that applies a given `this` context and any optional left and right arguments.

Examples:

`this` binding:
```javascript
// the module scope
var name="the module scope", description="the default this context";
// a simple robot object
var robot = {
    name : 'Robot',
    description : 'a killing machine',
    describeSelf: function(){
        console.log("Hello, my name is ", this.name, ", and I am ", this.description);
    }
}

// the robot describes itselfx 
robot.describeSelf();
// Output: Hello, my name is Robot, and I am a killing machine

// the same thing
fn.bind(robot, "describeSelf")();
// Output: Hello, my name is Robot, and I am a killing machine

// the same thing
fn.bind(robot, "describeSelf")();
// Output: Hello, my name is Robot, and I am a killing machine


var simonSays = fn.bind(say, null, ["Simon", "says"]);
simonSays("Jump", "on one leg"); // Ouput: Simon says: jump on one leg
simonSays("Spin", "around"); // Ouput: Simon says: spin around

```


LEft binding
```javascript

function command(who, what, act, upon){
    console.log(who + " " + what + ": " + act + " " + upon);
}

var simonSays = fn.bind(say, null, ["Simon", "says"]);
simonSays("Jump", "on one leg"); // Ouput: Simon says: jump on one leg
simonSays("Spin", "around"); // Ouput: Simon says: spin around

```
<commit_msg>improved README a bit<commit_after># fn-util
Yes, Yet another functional library toolkit. This is just a collection of functional programming tools that I have used have been useful for me.

![fn-util build status](https://travis-ci.org/g-i-o-/fn-util.svg)

## bind
Wraps a given function within a bound function that applies a given `this` context and any optional left and right arguments.

Examples:

`this` binding:
```javascript
// the module scope
var name="the module scope", description="the default this context";
// a simple robot object
var robot = {
    name : 'Robot',
    description : 'a killing machine',
    describeSelf: function(){
        console.log("Hello, my name is ", this.name, ", and I am ", this.description);
    }
}

// the robot describes itselfx
robot.describeSelf();
// Output: Hello, my name is Robot, and I am a killing machine

// the same thing
fn.bind(robot.describeSelf, robot)();
// Output: Hello, my name is Robot, and I am a killing machine
```


Left binding
```javascript

function command(who, what, act, upon){
    console.log(who + " " + what + ": " + act + " " + upon);
}

var simonSays = fn.bind(say).lbind("Simon", "says");
simonSays("Jump", "on one leg"); // Ouput: Simon says: jump on one leg
simonSays("Spin", "around"); // Ouput: Simon says: spin around

```

{'fraction_non_alphanumeric': 0.13967055593685657, 'fraction_numerical': 0.001029512697323267, 'mean_word_length': 3.8181818181818183, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4950044', 'n_tokens_mistral': 925, 'n_tokens_neox': 902, 'n_words': 362}