4 ms·
How can you compare that code with the Python one liner in the original article? It's interesting, of course, but it's not "easy to work with".
by ngrilly 11y ago
How can you compare that code with the Python one liner in the original article? It's interesting, of course, but it's not "easy to work with".
- Dewie3 11y agoHe explicitly gives standard machinery like the a boolean type and natural numbers, presumably to show more clearly what the parts are built up from. You probably wouldn't need to write all of that to use HList at a later point.
- danghica 11y agoYou would still need to program in Agda though :) Cheers!
- TheCoelacanth 11y agoOnly the two lines starting with ex1 for heterogeneous if and the two lines starting with ex2 for heterogeneous lists are directly comparable to the Python examples. The rest is just defining what a boolean is, what a natural number is, what a character is, what if is, what a list is, what a heterogeneous list is, etc., to provide a full foundation for the examples.