233二点多反反复复vv ふたりの住んでいる村は大変貧しく、その日暮らすのも大変でしたが、でも心の優しい人たちばかりでしたので、すぐにおなかのすいている子供のために持っているもので分けられるものをお爺さんたちにくれたのでした。 他們住的村子非常貧窮,每天的生活都很艱難。 但村裡的人心地善良,願意拿出自己僅有的食物給老爺爺,幫助這個餓肚子的孩子。 あかたろうはなんでも喜んでぱくぱく食べるので、それを目を細めて楽しそうに見ていたおじいさんとおばあさんは、ふとあることに気が付きました。どうやらあかたろうはご飯を一膳食べるとご飯一膳分大きくなるようなのです。 阿垢太郎開心地什麼都大口大口吃著,老爺爺和老奶奶高興地瞇著眼睛看著他吃,突然察覺到什麼。 他們注意到阿垢太郎吃了一碗飯,身體就會長大一碗飯的份量。 何日かして随分と大きくなったあかたろうはある日お爺さんにこういいました。 「じ様、おら金棒がほしい。金棒をくれろや。」 幾天後,阿垢太郎長大了不少。 有一天,他對老爺爺說:「爺爺,我想要一根金棒,給我吧。」 お爺さんとおばあさんは金棒など何にするのかと思いましたが、神さまに命を吹き込んでいただいたあかたろうです、きっとなにかわけがあるのだろうと、村の鍛冶屋へ行き、こうこうこういうわけで金棒を作ってくれないかと頼みました。 老爺爺和老奶奶不知道他要金棒做什麼,但想到阿垢太郎是被神注入生命的,肯定有他的道理。 於是,他們去了村裡的鐵匠鋪,請求鐵匠幫忙做一根金棒。 すると鍛冶屋は、事の次第を知っていましたし、お爺さんたちと同じ考えだったので、自分から金棒を作って、あかたろうに渡してくれました。 鐵匠聽了事情的來龍去脈,想法跟老爺爺他們相同,便自己製作了一根金棒給阿垢太郎。 それか1らあ1かた1ろうはお爺さんとおばあさん、村の人11た1121ちに別1れを告げて、おばあさんのこし11らえてくれた赤いちゃんちゃんこを着て、1一人で金1棒11を1肩に担いで村を出て行きました。 阿垢太郎告別了老1爺爺、老奶奶和村民,穿上老奶奶做的紅1色1無袖,羽織.,扛著金棒獨自離開了村子。 gg
Ideal for algorithms: Functional Programming

BLOGS

Ideal for algorithms: Functional Programming

Ideal for algorithms: Functional Programming

Fri, 09 Apr 2021

Common programming languages generally allow multiple programming paradigms, making a rough distinction between declarative and imperative programming. When programming software such paradigms form the basic approach. A sub-form of the declarative approach is so-called functional programming which is mainly used to develop the following programs or codes:

  • Technical and mathematical applications
  • Artificial intelligence (AI)
  • Compilers and parsers
  • Algorithms

What is functional programming?

As the name suggests, Functions are the focus of the functional programming approach. All elements may be considered a function with a functional program, and the code can be executed with concatenated function calls. There are no stand-alone value assignments. The best envisaged is a function as a special variant of a sub-program. This is reusable, and it returns a result directly, unlike a procedure.

Some functions are defined and then applied in many higher-level programming languages, so this is not a special feature of functional programming. The fact that functions within this programming paradigm can take on different forms is the thing that makes the functional approach so important for computer science and at the same time suitable for a wide range of applications. This special handling of functions allows programmers to implement complex computational tasks and to process them.

Functional programming languages

The most important programming languages based on the functional approach like LISP, ML, Haskell, OCaml, F#, Erlang, Clojure, Scala. There are well-known programming languages that allow functional programming as one of several possible paradigms: Perl, Ruby, Visual, Basic .NET, Dylan, ECMAScript.

Advantages

  • Programs are stateless
  • Well-suited for parallelization
  • Easily testable code
  • Easily verifiable code, even stateless functions can be verified
  • Can be combined with imperative, object-oriented programming
  • More accurate, shorter code

Disadvantages

  • Data like variables cannot be changed
  • Retrieval of large amounts of data not possible efficiently
  • Not recommended for connections to databases and servers
  • Not suitable for many recursions of the same stack
  • Recursive programming can lead to serious errors
  • Not suitable for all tasks