Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistake in Documentation, Getting Started: Starting a Real Project, Adding Functions or Classes #1351

Open
tnev opened this issue Jul 17, 2023 · 0 comments

Comments

@tnev
Copy link

tnev commented Jul 17, 2023

Please complete the information below:

Where is the problem?

Documentation, Getting Started: Starting a Real Project, Adding Functions or Classes section, code example

What is the problem?

The code example is

use namespace HH\Lib\Vec;

function square_vec(vec<num> $numbers): vec<num> {
  return Vec\map($numbers, $number ==> $number * $number);
}

It then notes "If you then run hh_client, it will tell you of a mistake... To fix this, change the return type of the function from vec to vec."

However the return type is already num in the example.


Please don't change anything below this point.


  • Build ID: HHVM=HHVM-4.164.0:HSL=v4.108.1:2023-07-17T02:20:09+0000:1fa47f258c6b68f8ec01899aa82fd6ffa0957109
  • Page requested: /hack/getting-started/starting-a-real-project
  • Page requested at: Mon, 17 Jul 2023 12:07:46 +0000
  • Controller: GuidePageController
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant