Logo

Programming-Idioms

History of Idiom 3 > diff from v29 to v30

Edit summary for version 30 by Kotik:
[Scheme] begin is redundant here

Version 29

2017-01-11, 10:18:37

Version 30

2017-01-11, 10:21:44

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Code
(define finish
    (lambda (name)
        (begin
            (display "My job here is done. Goodbye ")
            (display name)
            (newline))))
Code
(define finish
    (lambda (name)
        (display "My job here is done. Goodbye ")
        (display name)
        (newline)))
Demo URL
http://repl.it/SII/1
Demo URL
https://repl.it/SII/2