The cons (::
) operator is a fundamental part of 1) writing recursive list functions in OCaml and similar languages, and 2) pattern matching on lists. However, I can't find anything in Reason's documentation concerning cons, and in the REPL, this throws an error:
Reason # let myList = [2, 3, 4];
let myList : list int = [2, 3, 4]
Reason # 1 :: myList;
Error: Syntax error
Is there a replacement for the cons operator?