Slide 20
Slide 20 text
Introduction Dhall Language Dhall And Haskell Other Formats Conclusion
Lists
1
[] : List Natural
2
[ 1, 2, 3 ]
3
[ 1, 2 ] # [ 3, 4 ]
4
List/length Text ["foo", "bar"]
5
List/head Natural [1, 2, 3]
6
List/last Natural [1, 2, 3]
7
List/reverse Natural [1, 2, 3]
8
:type List/fold
9
:type List/build
1
let plus = (\(x : Natural) -> \(y : Natural) -> x + y) in
2
List/fold Natural [ 1, 2, 3] Natural plus 0
3
4
-- => 6
Markus Hauck @markus1189 Dhall: An Introduction 19