idiom#3 构造程序

Create a procedure

Python


def finish(name):
    print(f'My job here is done. Goodbye {name}')

Rust

#![allow(unused)]

fn main() {
fn finish(name: &str) {
    println!("My job here is done. Goodbye {}", name);
}

}

Humm?

和 Python 基本相似复杂度; 就是多出类型相关的声明, 不过, Python 要上了类型注解就更加像了...

       _~^+-~_
   () /  ← #  \ ()
     '_   ⩌   _'
     ( '-----' /

...act by ferris-actor v0.2.4 (built on 23.0303.201916)

知识共享许可协议 本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可;-)