Closed
Description
The type signature for diamond
...
diamond :: Char -> [String]
... demands the user to either:
- Implement a partial function.
- Define a behavior when the input isn't in
['A'..'Z']
.
It should probably be changed to...
diamond :: Char -> Maybe [String]
... making it total and also signalling invalid input in a more idiomatic way.
Metadata
Metadata
Assignees
Labels
No labels