<commit_before># Scala Sugar

Compared to coding in Java, coding in Scala is pretty sweet. Compared to coding in highly expressive languages such as Python and Ruby, Scala holds its own most of the time but not always. This library is a collection of useful extensions to the core Scala libraries (implicit and otherwise) that make programming is Scala even sweeter.  

## Implicits

Where possible, implicits are implemented using [value classes](http://docs.scala-lang.org/overviews/core/value-classes.html) to reduce overhead.

```scala
import com.swoop.scala.sugar.Implicits._

// ap() allows arbitrary function chaining. The name comes from ap(plying) a function.
// This is similar to one use of Ruby's Object#try (the other being taken care of by Option).
// It is also convenient for injecting orthogonal logic into a method chain, similar to Ruby's Object#tap.

5.ap(x => x + x)
// res0: Int = 10

scala> 5.ap(x => {println(s"I got ${x}"); x}).toFloat
// I got 5
// res2: Float = 5.0
```

## License

`scala-sugar` is Copyright &copy; 2015 [<NAME>](https://about.me/simeonov) and [Swoop, Inc.](http://swoop.com). It is free software, and may be redistributed under the terms of the LICENSE.<commit_msg>Adds semantic versioning<commit_after># Scala Sugar

Compared to coding in Java, coding in Scala is pretty sweet. Compared to coding in highly expressive languages such as Python and Ruby, Scala holds its own most of the time but not always. This library is a collection of useful extensions to the core Scala libraries (implicit and otherwise) that make programming is Scala even sweeter.

This project uses [semantic versioning](http://semver.org/).

## Implicits

Where possible, implicits are implemented using [value classes](http://docs.scala-lang.org/overviews/core/value-classes.html) to reduce overhead.

```scala
import com.swoop.scala.sugar.Implicits._

// ap() allows arbitrary function chaining. The name comes from ap(plying) a function.
// This is similar to one use of Ruby's Object#try (the other being taken care of by Option).
// It is also convenient for injecting logic into a method chain, similar to Ruby's Object#tap.

5.ap(x => x + x)
// res0: Int = 10

5.ap{x => println(s"I got ${x}"); x}.toFloat
// I got 5
// res1: Float = 5.0
```

## License

`scala-sugar` is Copyright &copy; 2015 [<NAME>](https://about.me/simeonov) and [Swoop, Inc.](http://swoop.com). It is free software, and may be redistributed under the terms of the LICENSE.
{'fraction_non_alphanumeric': 0.10553983016579054, 'fraction_numerical': 0.010513546300040437, 'mean_word_length': 4.132780082987552, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '2509521', 'n_tokens_mistral': 770, 'n_tokens_neox': 716, 'n_words': 328}