Stream: contributing

Topic: minor fix?


view this post on Zulip itmuckel (Mar 11 2023 at 23:18):

Hi! I'm reading the tutorial and I think in "defining functions" this:

birds = 3

iguanas = 2

total = Num.toStr (birds + iguanas)

main =
    Stdout.line "There are \(total) animals."

addAndStringify = \num1, num2 ->
    Num.toStr (num1 + num2)

is meant to be

birds = 3

iguanas = 2

total = addAndStringify birds iguanas

main =
    Stdout.line "There are \(total) animals."

addAndStringify = \num1, num2 ->
    Num.toStr (num1 + num2)

right?

view this post on Zulip Brendan Hansknecht (Mar 11 2023 at 23:21):

yeah, should probably be using the addAndStringify function

view this post on Zulip itmuckel (Mar 11 2023 at 23:23):

Okay, I try to fix that and open a pull request :)

view this post on Zulip Brendan Hansknecht (Mar 11 2023 at 23:24):

That would be great!

view this post on Zulip itmuckel (Mar 11 2023 at 23:40):

Okay, I hope I did it right :sweat_smile:


Last updated: Jul 06 2025 at 12:14 UTC