May 2018
Beginner to intermediate
290 pages
6h 43m
English
To really get our arms around lazy sequences, let’s try a more interesting example. Suppose we needed some more or less randomly generated book maps for testing. We could sit down and manually cook up some nonsense books like this:
| | (def test-books |
| | [{:author "Bob Jordan", :title "Wheel of Time, Book 1"} |
| | {:author "Jane Austen", :title "Wheel of Time, Book 2"} |
| | {:author "Chuck Dickens", :title "Wheel of Time, Book 3"} |
| | {:author "Leo Tolstoy", :title "Wheel of Time, Book 4"} |
| | {:author "Bob Poe", :title "Wheel of Time, Book 5"} |
| | {:author "Jane Jordan", :title "Wheel of Time, Book 6"} |
| | {:author "Chuck Austen", :title "Wheel of Time, Book 7"}]) |
This will work, but armed with lazy sequences ...
Read now
Unlock full access