A similar program in Haskell:foo (a, b) = show a ++ " - " ++ show b lst = [(10, 20), (30, 40)] main = do print $ map foo lst Output: ["10 - 20","30 - 40"] And Haskell is regarded as one of the safest languages :-) Similar code is possible in F#, OCaml, Scala, etc.
And in Rust:
fn first((value, _): (int, f64)) -> int { value }
Bye,
bearophile
