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

Can't find List.cons mentioned in List docs page #456

Open
farskid opened this issue Oct 24, 2018 · 1 comment
Open

Can't find List.cons mentioned in List docs page #456

farskid opened this issue Oct 24, 2018 · 1 comment
Labels

Comments

@farskid
Copy link

farskid commented Oct 24, 2018

According to https://reasonml.github.io/docs/en/list-and-array, spread syntax for appending items to a list is just an alternative to List.cons. I couldn't find any reference to such a method name List.cons in API docs.

Is it a real thing or just a typo of List.concat?

@andywhite37
Copy link

I was looking for the same thing, and I don't think List.cons exists in the Reason/BuckleScript/Belt libraries in the mentioned form. I think they are referring to the List.cons from the OCaml (standard?) library, like here: https://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html

It sounds like this page is saying [h, ...t] is the Reason equivalent of List.cons, but it could be more clear.

@davesnx davesnx added the fix label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants