You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tuple projections are awkward, even considering standard library which offers fst, snd etc. for pairs and triples. There should be a convenient generic way of accessing them:
let t = (1, "xd", true, [4,5,6,7])
t[1] + List.length(t[4])
It's to be discussed if we prefer indexing from 0 or 1. For reference, Erlang and Scala do it from 1, while Python and JS prefer 0. Note that computationally it does not matter, because the index has to be a fixed (syntactically) integer due to type consequences.
The text was updated successfully, but these errors were encountered:
Tuple projections are awkward, even considering standard library which offers
fst
,snd
etc. for pairs and triples. There should be a convenient generic way of accessing them:It's to be discussed if we prefer indexing from 0 or 1. For reference, Erlang and Scala do it from 1, while Python and JS prefer 0. Note that computationally it does not matter, because the index has to be a fixed (syntactically) integer due to type consequences.
The text was updated successfully, but these errors were encountered: