• # Elm rulez

    Posté par (site web personnel) . En réponse au journal Un print(1 + "3a"), ça nous inspire comment ?. Évalué à 10.

    Voilà ce qui se passe quand on veut compiler une telle addition en Elm

    -- TYPE MISMATCH --------------------------------------------- repl-temp-000.elm
    The right side of (+) is causing a type mismatch.
    3| 1 + "3a"
     ^^^^
    (+) is expecting the right side to be a:
     number
    But the right side is:
     String
    Hint: To append strings in Elm, you need to use the (++) operator, not (+).
    <http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#++>
    Hint: With operators like (+) I always check the left side first. If it seems
    fine, I assume it is correct and check the right side. So the problem may be in
    how the left and right arguments interact.
    

    Dieu que j'adore ce langage..