• Digit@lemmy.wtf
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    43 minutes ago

    Hrmm.

    I read that as resulting in 21.

    My education system did fail me.

    I plugged that into ghci as 2+5*(8-5), and it says 17.

    :(

    I did (2+5)*(8-5).

    Doh.

    [Edit: (Double doh! Mistyped that here as 5+2. XD)]

    • A_Chilean_Cyborg@feddit.cl
      link
      fedilink
      English
      arrow-up
      15
      arrow-down
      1
      ·
      3 hours ago

      You do parenthesis first and then multiplications and then sums, you did parenthesis, then sums, then multiplications, wich is wrong.

    • Nils@lemmy.ca
      link
      fedilink
      English
      arrow-up
      5
      arrow-down
      1
      ·
      2 hours ago

      plugged that into ghci as 5+2*(8-5), and it says 17.

      You might want to report that error. Or, did you mean 2+5*(8-5)?

      • Digit@lemmy.wtf
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        37 minutes ago

        Oops! Typo. School failed me hard!

        [Edit: Thanks. Corrected that.]