Skip to content

A tiny, not so important, thing in the solution of Homework 06 #33

@Tony-Makdissy

Description

@Tony-Makdissy

In lines 98 & 104 of 6th lesson solution, namely

factorial :: Int -> String

and

    result = product [1 .. n]

I think the type should be Integer instead of Int, it seems the same but this code won't work if n > 20. I know this homework isn't meant to deal with such things, but I think it's a good opportunity to show when Integer is more suitable than Int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions