<commit_before>### Where to ask for help?

Join the Gitter chat room <br />[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/staltz/cycle?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## What does the suffixed dollar sign `$` mean?

The dollar sign `$` *suffixed* to a name is a hard convention to indicate that the variable is an Observable (instance of an RxJS Observable). Not only is it a naming helper to indicate types, it is also a required convention when working with custom elements. The following are examples of the former and the latter.

Suppose you have an Observable of vtree depending on an Observable of "lastname" string:
```javascript
var vtree$ = Cycle.createStream(function view(lastname$) {
  return lastname$.map(lastname => h('h1', lastname))
});
```

Notice that the function inside `map` takes `lastname` as argument, while the Observable is named `lastname$`. The naming convention indicates that `lastname` is the value being emitted by `lastname$`. In general, `foobar$` emits `foobar`. Without this convention, if `lastname$` would be named simply `lastname`, it would confuse readers about the types involved. Also, `lastname$` is succinct compared to alternatives like `lastnameObservable`, `lastnameStream`, or `lastnameObs`. This convention can also be extended to arrays: use plurality to indicate the type is an array. Example: `vtrees` is an array of `vtree`, but `vtree$` is an Observable of `vtree`.

The suffixed dollar convention is required for custom elements. When you use a custom element and give it attributes, the attribute name will be suffixed with `$` to recover the Observable in the custom element's properties. Example:

```javascript
var vtree$ = Cycle.createStream(function view(lastname$) {
  return lastname$
    .map(function (lastname) {
      return h('custom-button', {label: lastname});
      // lastname emitted into label$ in the `props` object 
      // that is passed to the definition function for <custom-button>
    });
});<commit_msg>Add FAQ answer to Stream vs Observable<commit_after>### Where to ask for help?

Join the Gitter chat room <br />[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/staltz/cycle?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## What is the difference between a Cycle Stream and Rx.Observable?

Cycle Stream is a subclass of Rx.Observable. Every Stream is an Observable. So when we talk of Observables, we include Cycle Streams, but not the other way around.

A Cycle Stream is [well introduced here](https://github.com/staltz/cycle/blob/master/docs/stream.md#cycle-streams). An alternative name for Stream would have been "InjectableObservable" but the latter is less friendly than the former. 

## What does the suffixed dollar sign `$` mean?

The dollar sign `$` *suffixed* to a name is a hard convention to indicate that the variable is an Observable (instance of an RxJS Observable). Not only is it a naming helper to indicate types, it is also a required convention when working with custom elements. The following are examples of the former and the latter.

Suppose you have an Observable of vtree depending on an Observable of "lastname" string:
```javascript
var vtree$ = Cycle.createStream(function view(lastname$) {
  return lastname$.map(lastname => h('h1', lastname))
});
```

Notice that the function inside `map` takes `lastname` as argument, while the Observable is named `lastname$`. The naming convention indicates that `lastname` is the value being emitted by `lastname$`. In general, `foobar$` emits `foobar`. Without this convention, if `lastname$` would be named simply `lastname`, it would confuse readers about the types involved. Also, `lastname$` is succinct compared to alternatives like `lastnameObservable`, `lastnameStream`, or `lastnameObs`. This convention can also be extended to arrays: use plurality to indicate the type is an array. Example: `vtrees` is an array of `vtree`, but `vtree$` is an Observable of `vtree`.

The suffixed dollar convention is required for custom elements. When you use a custom element and give it attributes, the attribute name will be suffixed with `$` to recover the Observable in the custom element's properties. Example:

```javascript
var vtree$ = Cycle.createStream(function view(lastname$) {
  return lastname$
    .map(function (lastname) {
      return h('custom-button', {label: lastname});
      // lastname emitted into label$ in the `props` object 
      // that is passed to the definition function for <custom-button>
    });
});
{'fraction_non_alphanumeric': 0.09258456201214224, 'fraction_numerical': 0.0013009540329575022, 'mean_word_length': 4.861499364675985, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 5, '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': '1157282', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1227, 'n_words': 587}