This works fine (props is just a list of strings):
let tupes = List.map( prop => (prop, Js.Dict.empty()), props);
let resultStart = switch(List.hd(tupes)) {
| item => item
| exception Failure(_) => ("---", Js.Dict.empty())
};
However, as soon as I try to get the List tail, it says syntax error on resultStart and resultEnd is fine?
let resultEnd = switch(List.tl(tupes)) {
| remaining => remaining,
| exception Failure(_) => []
};