Essentially I have a function that uses Maybe Int's to display a Sudoku problem. The Solution to the Sudoku contains only Ints and the code for displaying the Grid will be almost identical, with the exception of Maybe Int used for Problems and Int used for Solutions.
Is it possible to use Int values for a function that requires Maybe Int, if so how?
Edit: Just would work, is there a way to convert a list of Int's into maybe Int's?
If xs
is a [Int]
and you want a [Maybe Int]
instead, use map Just xs
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With