[PR] [Docs] Explain function subtyping and variance
[PR] [Docs] Explain function subtyping and variance

Summary:
I'm not an expert at type theory, but trying out the previous function subtyping example seemed to convince me that it was not correct because it explained that inputs and outputs should both be subtypes, whereas inputs should actually be a super type.

I'm also not an expert at technical writing, so please let me know (or just edit) if my tone and style don't fit with the rest of the docs.

I tried to add a light explanation of function subtyping that might help for simple cases, while still pointing to the Variance page for a more detailed discussion.

(Note that, in reading the Variance page, I notice that it mostly focuses on variance as applied to OO class hierarchies. I think there might be room for a simpler explanation of function input/output types. There is also probably a need for some examples of just functions with complex cases: arguments that are callbacks, whose arguments are in output position and therefore covariant, arguments that are written to, and therefore invariant, etc.)
Closes https://github.com/facebook/flow/pull/4635

Differential Revision: D5660256

Pulled By: jbrown215

fbshipit-source-id: bfe0b6c447f61cc34c2eb01c637ca7a349259ec3

samwgoldman/flow,jamesgpearce/flow,jamesgpearce/flow,facebook/flow,JonathanUsername/flow,gabelevi/flow,popham/flow,JonathanUsername/flow,facebook/flow,claudiopro/flow,mroch/flow,popham/flow,jamesgpearce/flow,gabelevi/flow,jamesgpearce/flow,nmote/flow,popham/flow,ylu1317/flow,TiddoLangerak/flow,nmote/flow,jamesgpearce/flow,MichaelDeBoey/flow,JonathanUsername/flow,gabelevi/flow,popham/flow,mroch/flow,nmote/flow,jamesgpearce/flow,facebook/flow,facebook/flow,jamesgpearce/flow,samwgoldman/flow,TiddoLangerak/flow,JonathanUsername/flow,mroch/flow,JonathanUsername/flow,facebook/flow,MichaelDeBoey/flow,TiddoLangerak/flow,samwgoldman/flow,AgentME/flow,TiddoLangerak/flow,gabelevi/flow,ylu1317/flow,MichaelDeBoey/flow,claudiopro/flow,MichaelDeBoey/flow,popham/flow,mroch/flow,samwgoldman/flow,facebook/flow,gabelevi/flow,facebook/flow,popham/flow,popham/flow,mroch/flow,gabelevi/flow,samwgoldman/flow,AgentME/flow,claudiopro/flow,JonathanUsername/flow,samwgoldman/flow,mroch/flow,JonathanUsername/flow,nmote/flow,claudiopro/flow,MichaelDeBoey/flow,nmote/flow,nmote/flow,AgentME/flow,AgentME/flow,samwgoldman/flow,nmote/flow,claudiopro/flow,ylu1317/flow,ylu1317/flow,gabelevi/flow,mroch/flow,AgentME/flow,ylu1317/flow,TiddoLangerak/flow