 To create any possible lazy sequence, we can use the lazySeq macro. The lazySeq macro takes a body which the macro will compile into a function, and this function is expected to return a sequence. Here we assign the X a new lazy sequence whose body simply returns a list of four values. This body is executed the first time we call either first or rest on the lazy sequence, and the returned sequence is then cached for later calls to first or rest. So be clear that the function encapsulated by the lazy sequence only ever runs once. Now, in our trivial example above, the use of a lazy sequence is entirely pointless because we might as well just use the list directly. To make a useful lazy sequence, we need to define it in a recursive function and use consts. The zeros function here will return a lazy sequence whose encapsulated function returns a const with the value 0 and it referenced to another lazy sequence recursively generated by the zeros function. When we call zeros, it returns a lazy sequence, and when we invoke first or rest on that lazy sequence, the body of the lazy sequence runs generating a const. First and rest, called on the lazy sequence, returns the first and rest of this const. Because the sequence referenced by the const is itself a lazy sequence the same as our original, calling first after rest will return zero as well. In fact, calling first after any number of rest calls will always return zero. Hence, the lazy sequence returned by zeros is an infinite sequence of zeros. Now, note that we would get the same effect if we swap the call to const with the call to lazy seek. In this version, the zeros function directly returns a const and this const holds the value 0 and references a lazy sequence which recursively generates an identical const. Either way we do it, both solutions work equally well. Here's another function that produces a lazy sequence called increasing. The increasing function takes a number argument and returns a lazy sequence whose encapsulated function returns a const with that number value and a reference to the lazy sequence returned by invoking increasing with an argument that is one greater. Effectively, our increasing function returns a lazy sequence that starts at n and increases by one indefinitely. In our example use here, invoking increasing with the argument 2 creates an infinite sequence of integers that counts up from the value 2. If we want lazy seek to return a finite sequence, we simply add a terminating condition to our recursive function such that at some point the function returns nil instead of another lazy sequence or const. Here, in this function increasing to 7, when the argument is greater than 7, the function returns nil. So, the lazy sequence created by the function terminates with the value 7.