concept mathematic in category java

appears as: mathematics
Modern Java in Action: Lambdas, streams, reactive and functional programming

This is an excerpt from Manning's book Modern Java in Action: Lambdas, streams, reactive and functional programming.

A second idea is that of (structural) pattern matching.[8] This is used in mathematics. For example:

8 This phrase has two uses. Here we mean the one familiar from mathematics and functional programming whereby a function is defined by cases, rather than using if-then-else. The other meaning concerns phrases like “find all files of the form ‘IMG*.JPG’ in a given directory” associated with so-called regular expressions.

As a side remark, it’s a bit of a shame that you have to write f.apply(a) instead of simply writing f(a) as in mathematics, but Java just can’t get away from the view that everything is an object instead of the idea of a function being truly independent!

Java 8 in Action: Lambdas, streams, and functional-style programming

This is an excerpt from Manning's book Java 8 in Action: Lambdas, streams, and functional-style programming.

A second idea is that of (structural) pattern matching.[8] This is used in mathematics, for example:

8 There are two uses of this phrase. Here we mean the one familiar from mathematics and functional programming whereby a function is defined by cases, rather than using if-then-else. The other meaning concerns phrases like “find all files of the form ‘IMG*.JPG’ in a given directory” associated with so-called regular expressions.

As a side remark, it’s a bit of a shame that you have to write f.apply(a) instead of just f(a) as in mathematics, but Java just can’t get away from the view that everything is an object—instead of the idea of a function being truly independent!