<commit_before># Function Module
***Note that while these are separated into categories here based on behavior, they are all called from _.Function***

## Bind
### Func\<TResult\> Bind\<T1, TResult\>(Func\<T1, TResult\> function, T1 a)
Returns a function with all of its arguments bound to the passed arguments. Works with up to 16 arguments.
```
Func<string, string> foo = (s) => s + "bar";

Func<string> bound = _.Function.Bind(foo, "bar");

bound(); // "foobar"
```

### Func\<T2, TResult\> Partial\<T1, T2, TResult\>(Func\<T1, T2, TResult\> function, T1 a)
Returns a function with some of its arguments bound to the passed arguments, going from left to right. Works with any combination of partial binds, up to 15 arguments bound to a 16 argument function.
```
// partially binding to a small function
Func<string, string, string> foo = (a, b) => a + b;

Func<string, string> bound = _.Function.Partial(foo, "foo");

bound("bar"); // "foobar"

// partially binding to a bigger function
Func<string, string, string, string, string, string, string> bigFoo = (a, b, c, d, e, f) => a + b + c + d + e + f;

Func<string, string, string, string> bound = _.Function.Partial(bigFoo, "a", "b", "c");

bound("d", "e", "f"); // "abcdef"
```

## Boolean
### Func\<T1, bool\> Negate(Func<T1, bool> toNegate)
Returns a function which returns the opposite of toNegate whenever it is called;
```
Func<string, string, bool> equals = (a, b) => a == b;
Func<string, string, bool> notEquals = _.Function.Negate(equals);

equals("foo", "foo"); // true
notEquals("foo", "foo"); // false

equals("foo", "bar"); // false
notEquals("foo", "bar"); // true
```

### Func<bool> Or(params Func<bool>[] fns)
***TODO***

### Func<bool> And(params Func<bool>[] fns)
***TODO***

## Compose
### TResult Apply\<T, TResult\>(Func\<T, TResult\> function, T[] arguments)<commit_msg>added docs for Function.Boolean.And and Function.Boolean.Or<commit_after># Function Module
***Note that while these are separated into categories here based on behavior, they are all called from _.Function***

## Bind
### Func\<TResult\> Bind\<T1, TResult\>(Func\<T1, TResult\> function, T1 a)
Returns a function with all of its arguments bound to the passed arguments. Works with up to 16 arguments.
```
Func<string, string> foo = (s) => s + "bar";

Func<string> bound = _.Function.Bind(foo, "bar");

bound(); // "foobar"
```

### Func\<T2, TResult\> Partial\<T1, T2, TResult\>(Func\<T1, T2, TResult\> function, T1 a)
Returns a function with some of its arguments bound to the passed arguments, going from left to right. Works with any combination of partial binds, up to 15 arguments bound to a 16 argument function.
```
// partially binding to a small function
Func<string, string, string> foo = (a, b) => a + b;

Func<string, string> bound = _.Function.Partial(foo, "foo");

bound("bar"); // "foobar"

// partially binding to a bigger function
Func<string, string, string, string, string, string, string> bigFoo = (a, b, c, d, e, f) => a + b + c + d + e + f;

Func<string, string, string, string> bound = _.Function.Partial(bigFoo, "a", "b", "c");

bound("d", "e", "f"); // "abcdef"
```

## Boolean
### Func\<T1, bool\> Negate(Func<T1, bool> toNegate)
Returns a function which returns the opposite of toNegate whenever it is called;
```
Func<string, string, bool> equals = (a, b) => a == b;
Func<string, string, bool> notEquals = _.Function.Negate(equals);

equals("foo", "foo"); // true
notEquals("foo", "foo"); // false

equals("foo", "bar"); // false
notEquals("foo", "bar"); // true
```

### Func<bool> Or(params Func<bool>[] fns)
Returns a function which aggregates the results of all the given functions as a logical "or" does, including short-circuiting to avoid processing functions more than necessary
```
bool[] wasCalled = {false, false, false};
Func<bool> func1 = () => (wasCalled[0] = true) && false;
Func<bool> func2 = () => (wasCalled[1] = true) && true;
Func<bool> func3 = () => (wasCalled[2] = true) && false;

var orCombined = _.Function.Or(func1, func2, func3);

onCombined(); // true
wasCalled; // {true, true, false}
```

### Func<bool> And(params Func<bool>[] fns)
```
bool[] wasCalled = {false, false, false};
Func<bool> func1 = () => (wasCalled[0] = true) && true;
Func<bool> func2 = () => (wasCalled[1] = true) && false;
Func<bool> func3 = () => (wasCalled[2] = true) && true;

var orCombined = _.Function.And(func1, func2, func3);

onCombined(); // false
wasCalled; // {true, true, false}
```

## Compose
### TResult Apply\<T, TResult\>(Func\<T, TResult\> function, T[] arguments)
{'fraction_non_alphanumeric': 0.18301514154048718, 'fraction_numerical': 0.01141101601931095, 'mean_word_length': 4.538274605103281, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2716530', 'n_tokens_mistral': 1564, 'n_tokens_neox': 1501, 'n_words': 544}