https://flowtype.org/try is broken since the flow team pushed v0.36.0 three hours ago. 😕 I filed an issue here: facebook/flow#3003 To run any of the below examples, alter the version dropdown in to top right to v0.36.0
Flow can actually infer the parameter and return types of the function: https://flowtype.org/try/#0GYVwdgxgLglg9mABBO4oBM4HcwBU4DCAFgE4wDOUAtgIbkAU6NUApgJSIDeAUIsgpURMAnuQAyLYFEQBeRACYALIgC0Q5i269EMYIkY1REqYgB8iAAwcefPiRZQQJJAAMAJJxHjJUAL7rRRFgAG2DEYjJKWnIAQhdtX25E7hQwQSZWWUQwFixEABENejYAOgBzB0LWYpTUMAxsPEJSCmo6A1ZSqDgAVQAHPpYSAjoWYqA