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)
Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)
finish := func(name string) {
fmt.Println("My job here is done. Good bye " + name)
}
(defn main- [& args]
(println "I got all this arguments " args " and now I'm returning nil. Peace out!"))
const greet = who => console.log(`Hi ${who}!`)
function()
{
echo "Hello World";
}
sub some_procedure {
print 'some side effect';
return;
}
def finish(name):
print(f'My job here is done. Goodbye {name}')
def finish( name )
puts "My job here is done. Goodbye #{name}"
end
(define finish
(lambda (name)
(display "My job here is done. Goodbye ")
(display name)
(newline)))
(define (finish name)
(display "My job here is done. Goodbye ")
(display name)
(newline))
methodWithoutReturn
self doSomething.
[Transcript showln: 'something'] value.
finish := func(name string) { fmt.Println("My job here is done. Good bye " + name) }
func finish(name string) { fmt.Println("My job here is done. Good bye " + name) }
procedure Finish (Name : String) is begin Put_Line ("My job here is done. Goodbye " & Name); end Finish;
void finish(void) { printf("My job here is done.\n"); }
let do_something arg1 arg2: unit = print_endline "foo"
(defn main- [& args] (println "I got all this arguments " args " and now I'm returning nil. Peace out!"))
void finish(char* name){ cout << "My job here is done. Goodbye " << name << "\n"; }
void Finish(string name) => System.Console.WriteLine($"My job here is done. Goodbye, {name}");
void Finish(string name) { System.Console.WriteLine($"My job here is done. Goodbye, {name}"); }
void finish() { writeln("I' m a done job"); }
void finish(String name) { print("My job here is done. Goodbye $name."); }
def finish(name) do IO.puts "My job here is done. Goodbye #{name}" end
-spec procedure() -> _. procedure() -> io:format("#YOLO!~n").
module foo implicit none contains subroutine bar print *,"Hello" end subroutine bar end module foo
void finish(String name){ println "My job here is done. Goodbye $name" }
f = print "whatever"
function bli() { console.log('Hello World!!!'); }
let dog = 'Poodle'; const dogAlert = () => alert(dog);
const greet = who => console.log(`Hi ${who}!`)
var bli = function() { console.log('Hello World!!!'); }
interface F { void set(); } F f = () -> out.println("abc"); f.set();
void finish(String name){ System.out.println("My job here is done. Goodbye " + name); }
void f() { out.println("abc"); }
private void methodName() { System.out.println("Hello, World!"); }
fun finish(name: String) { println("My job here is done. Goodbye $name") }
(defun show (message) (format t "Hello: ~a" message) (values))
function finish(name) print('My job here is done. Goodbye, '..name..'.') end
void foo(void) { NSLog(@"My job here is done. Goodbye\n"); }
function finish($name) { echo "My job here is done. Goodbye $name"; }
function() { echo "Hello World"; }
Procedure finish(name: String); Begin WriteLn('My job here is done. Goodbye ', name); End;
sub some_procedure { print 'some side effect'; return; }
def finish(name): print(f'My job here is done. Goodbye {name}')
f = lambda: print('abc') f()
def finish( name ) puts "My job here is done. Goodbye #{name}" end
fn finish(name: &str) { println!("My job here is done. Goodbye {}", name); }
def doSomething(name: String): Unit = { println(s"My job here is done. Goodbye ${name}") }
(define finish (lambda (name) (display "My job here is done. Goodbye ") (display name) (newline)))
(define (finish name) (display "My job here is done. Goodbye ") (display name) (newline))
methodWithoutReturn self doSomething. [Transcript showln: 'something'] value.
Sub Finish(name As String) Console.WriteLine($"My job here is done. Goodbye {name}") End Sub