Rustので関数型使用法

Rustは命令型言語ですが、数々の関数型プログラミング のパラダイムを模範としています。

In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that each return a value, rather than a sequence of imperative statements which change the state of the program. (コンピュータサイエンスにおいて、 関数型プログラミング とは、関数の適用と合成によってプログラムを構成するプログラミングパラダイムです。これは宣言的なプログラミングパラダイムです。その関数の定義は、プログラムの状態を変更する命令文の列ではなく、値を返す式のツリーです。)

Last change: 2024-07-09, commit: 317c88e