Ferns have a funny, replicated kind of structure. Look at the picture below. Each of the parts sticking out to the side looks a lot like the whole fern, but smaller and pointing out sideways. Or, put another way, a fern is just a branch with two rows of smaller ferns stuck alongside the branch. And, of course, eventually we get to some actual leaves.
Here's a pair of data definitions that capture that intuition.
A fern is either - (make-leaf number) - (make-branch number number list-of-fern list-of-fern) A list-of-fern is either - empty - (cons fern list-of-fern) (define-struct branch (length thickness left right)) (define-struct leaf (area))