schemedoc / cookbook

New Scheme Cookbook
https://cookbook.scheme.org
29 stars 3 forks source link

Refactor find-substring example #39

Closed lassik closed 2 years ago

lassik commented 2 years ago

Returning the string instead of using display will produce the indicated "hello world" (with quotes) in a Scheme REPL.

lassik commented 2 years ago

The (string-length input) makes substring more portable; in some Scheme implementations, substring always needs 3 arguments.

jcubic commented 2 years ago

LGTM