Skip to content
Permalink
Browse files

FAQ. Close #244. Close #219. Close #213. Close #205. Close #198. Close

…#194. Close #193. Close #192. Close #176. Close #175. Close #169. Close #168. Close #161. Close #139. Close #129. Close #121. Close #109. Close #108. Close #105. Close #83. Close #82. Close #77. Close #76. Close #62. Close #50. Close #6.
  • Loading branch information...
KtorZ committed Feb 20, 2016
2 parents 4631c31 + 978f5f2 commit ab1353b053fe9187442e111b5394044606aa84ad
Showing with 134 additions and 0 deletions.
  1. +6 −0 CONTRIBUTING.md
  2. +123 −0 FAQ.md
  3. +5 −0 README.md
@@ -9,6 +9,12 @@ By opening a pull request to this repository, you agree to provide your work und

Errata and basic clarifications will be accepted if we agree that they improve the content. You can also open an issue so we can figure out how or if it needs to be addressed. If you've never done this before, the [flow guide](https://guides.github.com/introduction/flow/) might be useful.

## Questions or Clarifications

Please, have a look at the [FAQ](FAQ.md) before you open an issue. Your question may already
have been answered. Should you still need to ask something? Feel free to open an issue and to
explain yourself.

## Translations

Translations to other languages are highly encouraged. Each official translation will be held as a separate repository in the [MostlyAdequate organization](https://github.com/MostlyAdequate) and linked from the English version book.
123 FAQ.md
@@ -0,0 +1,123 @@
## FAQ

- [Why are snippets written sometimes with semicolons and sometimes
without?](#why-are-snippets-written-sometimes-with-semicolons-and-sometimes-without)
- [Aren't external libraries like _ (ramda) or $ (jquery) making calls impure?](#arent-external-libraries-like-ramda-or-jquery-making-calls-impure)
- [What is the meaning of `f a` in signature?](#what-is-the-meaning-of-f-a-in-signature)
- [Is there any "real world" examples available?](#is-there-any-real-world-examples-available)
- [Why does the book uses ES5? Is any ES6 version available?](#why-does-the-book-uses-es5-is-any-es6-version-available)
- [What the heck is that reduce function about?](#what-the-heck-is-that-reduce-function-about)
- [Wouldn't you use a simplified English rather than the current style?](#wouldnt-you-use-a-simplified-english-rather-than-the-current-style)
- [What is Either? What is Future? What is Task?](#what-is-either-what-is-future-what-is-task)
- [Where do map, filter, compose ... methods come from?](#where-do-map-filter-compose-methods-come-from)

### Why are snippets written sometimes with semicolons and sometimes without?

> see [#6]
There are two schools in JavaScript, people who use them, and people who don't. We've made the
choice here to use them, and now, we strive to be consistent with that choice. If some are
missing, please let us know and will take care of the oversight.

### Aren't external libraries like _ (ramda) or $ (jquery) making calls impure?

> see [#50]
Those dependencies are available as if they were in the global context, part of the language.
So, no, calls can still be considered as pure.
For further reading, have a look at [this article about
CoEffects](http://tomasp.net/blog/2014/why-coeffects-matter/)

### What is the meaning of `f a` in signature?

> see [#62]
In a signature, like:

`map :: Functor f => (a -> b) -> f a -> f b`

`f` refers to a `functor` that could be for instance Maybe or IO. Thus, the signature abstracts
the choice of that functor by using a type variable which basically means that any functor
might be used where `f` stands as long as all `f` are of the same type (if the first `f a` in
the signature represents a `Maybe a`, then the second one **cannot refer to** an `IO b` but
should be a `Maybe b`. For instance:

```javascript
let maybeString = Maybe.of("Patate")
let f = function (x) { return x.length }
let maybeNumber = map(f, maybeString) // Maybe(6)
// With the following 'refined' signature:
// map :: (string -> number) -> Maybe string -> Maybe number
```

### Is there any "real world" examples available?

> see [#77], [#192]
Should you haven't reached it yet, you may have a look at the [Chapter
6](https://github.com/MostlyAdequate/mostly-adequate-guide/blob/master/ch6.md) which present a
simple flickr application.
Other examples are likely to come later on. By the way, feel free to share with us your
experience!

### Why does the book uses ES5? Is any ES6 version available?

> see [#83], [#235]
The book aims at being widely accessible. It started before ES6 went out, and now, as the new
standard is being more and more accepted, we are considering making two separated editions with
ES5 and ES6. Members of the community are already working on the ES6 version (have a look to
[#235] for more informations).

### What the heck is that reduce function about?

> see [#109]
Reduce, accumulate, fold, inject are all usual functions in functional programming used to
combine the elements of a data structure successively. You might have a look at [this
talk](https://www.youtube.com/watch?v=JZSoPZUoR58&ab_channel=NewCircleTraining) to get some
more insights about the reduce function.

### Wouldn't you use a simplified English rather than the current style?

> see [#176]
The book is written in its own style which contributes to make it consistent as a whole. If
you're not familiar with English, see it as a good training. Nevertheless, should you need help
to understand the meaning sometimes, there are now [several
translations](https://github.com/MostlyAdequate/mostly-adequate-guide/blob/master/TRANSLATIONS.md)
available that could probably help you.

### What is Either? What is Future? What is Task?

> see [#194]
We introduce all of those structure throughout the book. Therefore, you won't find any use of a
structure that hasn't previously be defined. Do not hesitate to read again some old parts if
you ever feel uncomfortable with those types.
A glossary/vade mecum will come at the end to synthesize all these notions.

### Where do map, filter, compose ... methods come from?

> see [#198]
Most of the time, those methods are defined in specific vendor libraries such as `ramda` or
`underscore`. You should also have a look to
[support.js](https://github.com/MostlyAdequate/mostly-adequate-guide/blob/master/code%2Fpart1_exercises%2Fsupport.js)
in which we define several implementations used for the exercises. Those functions are really
common in functional programming and even though their implementations may vary a bit, their
meanings remain fairly consistent between libraries.


[#6]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/6
[#50]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/50
[#62]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/62
[#77]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/77
[#83]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/83
[#109]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/109
[#176]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/176
[#192]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/192
[#194]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/194
[#198]: https://github.com/MostlyAdequate/mostly-adequate-guide/issues/198
[#235]: https://github.com/MostlyAdequate/mostly-adequate-guide/pull/235
@@ -55,6 +55,11 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)

See [TRANSLATIONS.md](TRANSLATIONS.md)

### FAQ

See [FAQ.md](FAQ.md)



# Plans for the future

2 comments on commit ab1353b

@Soreine

This comment has been minimized.

Copy link
Member

replied Feb 20, 2016

👏 👍

@wcjr

This comment has been minimized.

Copy link

replied Feb 22, 2016

Thanks! Much clearer for me :-)

Please sign in to comment.
You can’t perform that action at this time.