<commit_before># rx

    import "github.com/reactivego/rx"

[![](https://godoc.org/github.com/reactivego/rx?status.png)](http://godoc.org/github.com/reactivego/rx)

Package `rx` provides [Reactive Extensions](http://reactivex.io/) for Go.
An API for asynchronous programming with observable streams.

## Table of Contents

<!-- MarkdownTOC -->

- [Installation](#installation)
- [Usage](#usage)
- [Observables](#observables)
- [Operators](#operators)
- [Regenerating this Package](#regenerating-this-package)
- [Obligatory Dijkstra Quote](#obligatory-dijkstra-quote)
- [Acknowledgements](#acknowledgements)
- [License](#license)

<!-- /MarkdownTOC -->

### Installation

To use the `rx` package, you just import it in your code:

```go
import "github.com/reactivego/rx"
```
Access the package api directly through the `rx` prefix.

To use the package purely as a generic programming library, first install the [*jig*](../jig) tool, then import as follows:
```go
import _ "github.com/reactivego/rx"
```
The use of `_` stops the *go* tool from complaining about you not using any code from the package while at the same time allowing the [*jig*](../jig) tool to actually find the generics in the library.

## Usage
The library can be used in two ways

1. Direct API from `github.com/reactivego/rx`
2. Generics from `github.com/reactivego/rx/generic`

### Direct API
To use the API for asynchronous programming with observables 

You can use this package directly as follows:

	import "github.com/reactivego/rx"

Then you just use the code directly from the library:

	rx.From(1,2,"hello").Println()	

### Generics
Alternatively you can use the library as a generics library and use
a tool to generate statically typed  observables and operators:<commit_msg>Fix links.<commit_after># rx

    import "github.com/reactivego/rx"

[![](https://godoc.org/github.com/reactivego/rx?status.png)](http://godoc.org/github.com/reactivego/rx)

Package `rx` provides [Reactive Extensions](http://reactivex.io/) for Go.
An API for asynchronous programming with observable streams.

## Table of Contents

<!-- MarkdownTOC -->

- [Installation](#installation)
- [Usage](#usage)
- [Observables](#observables)
- [Operators](#operators)
- [Regenerating this Package](#regenerating-this-package)
- [Obligatory Dijkstra Quote](#obligatory-dijkstra-quote)
- [Acknowledgements](#acknowledgements)
- [License](#license)

<!-- /MarkdownTOC -->

### Installation

To use the `rx` package, you just import it in your code:

```go
import "github.com/reactivego/rx"
```
Access the package api directly through the `rx` prefix.

To use the package purely as a generic programming library, first install the [*jig*](github.com/reactivego/jig) tool, then import as follows:
```go
import _ "github.com/reactivego/rx"
```
The use of `_` stops the *go* tool from complaining about you not using any code from the package while at the same time allowing the [*jig*](github.com/reactivego/jig) tool to actually find the generics in the library.

## Usage
The library can be used in two ways

1. Direct API from `github.com/reactivego/rx`
2. Generics from `github.com/reactivego/rx/generic`

### Direct API
To use the API for asynchronous programming with observables 

You can use this package directly as follows:

	import "github.com/reactivego/rx"

Then you just use the code directly from the library:

	rx.From(1,2,"hello").Println()	

### Generics
Alternatively you can use the library as a generics library and use
a tool to generate statically typed  observables and operators:
{'fraction_non_alphanumeric': 0.12157968970380818, 'fraction_numerical': 0.002256699576868829, 'mean_word_length': 4.655502392344498, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3326555', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1039, 'n_words': 382}