[racket] [htdp] Can this be simplified?
Here is my solution to a modified version of DNAprefix from exercise
17.6.6. I feel like it *should* be able to be written more
clearly/simply but I can't think of the logic to make it work properly:
Modify |DNAprefix| so that it returns the first item beyond the pattern
in the search-string if the pattern is a proper prefix of the
search-string. If the lists do not match or if the pattern is no shorter
than the search-string, the modified function should still return
|false|. Similarly, if the lists are equally long and match, the result
is still |true|.
[content removed from archive]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101102/8275c4d9/attachment.html>