Mulesoft

"Programando con listas por comprensión"

Franco Arolfo (Ingeniero de Software).

 

logo-mulesoft.jpg

Abstract: In many programming languages, such as Haskell or python, it is popular to write list comprehensions, like we write in algebra

arolfo1.jpg

as the list of all even numbers in the set of real numbers. This article proposes an implementation of list comprehensions in Java, and then provides the implementation of the functions map and filter using the proposed code. Also, it supports binding more than one variable to the list’s definition, so we will be able to implement lists of cartesian products and also to add a relation that must hold between the two variables, like

arolfo2.png

 footer.jpg