1 dylan comment // random program i found
2 dylan code define function describe-list(my-list :: <list>, #key verbose?) => ()
3 dylan code format(*standard-output*, "{a <list>, size: %d", my-list.size);
4 dylan code if (verbose?)
5 dylan code format(*standard-output*, ", elements:");
6 dylan code for (item in my-list)
7 dylan code format(*standard-output*, " %=", item);
10 dylan code format(*standard-output*, "}");
11 dylan code end function;
13 dylan code describe-list(#(1, 2, 3, 4, 5, 6));
14 dylan comment // prints "{a <list>, size: 6}"
16 dylan code describe-list(#(5, 7, 3), verbose?: #t);
17 dylan comment // prints "{a <list>, size: 3, elements: 5 7 3}"