Should we deprecate comma?
bearophile
bearophileHUGS at lycos.com
Tue Mar 25 11:30:56 PDT 2014
> 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
More information about the Digitalmars-d
mailing list