If you ever wonder why
let myList = [1,2,3];
compiles to this code in Javascript
var myList = /* :: */[
1,
/* :: */[
2,
/* :: */[
3,
/* [] */0
]
]
];
then this answer on SO from @glennsl will give you an excellent explanation
Tips:
None => 0
Some(1) => [1]