Lists
[False, False, True] :: [Bool] -- a list of booleans
[1, 3, 5] :: [Int] -- a list of integers
['a', 'b', 'c'] :: [Char] -- a list of characters[[1, 2, 3], [4, 5, 6]] :: [[Int]] -- a list of lists of integersghci> x = [[1, 2, 3], ['a', 'b', 'c']]
<interactive>:2:7: error:
β’ No instance for (Num Char) arising from the literal β1β
β’ In the expression: 1
In the expression: [1, 2, 3]
In the expression: [[1, 2, 3], ['a', 'b', 'c']]Last updated