Cartesian product of two or more lists: Difference between revisions

mNo edit summary
Line 1,716:
=={{header|Fōrmulæ}}==
 
In [http{{FormulaeEntry|page=https://wiki.formulae.org/?script=examples/Cartesian_product_of_two_or_more_lists this] page you can see the solution of this task.}}
 
'''Solution'''
Fōrmulæ programs are not textual, visualization/edition of programs is done showing/manipulating structures but not text ([http://wiki.formulae.org/Editing_F%C5%8Drmul%C3%A6_expressions more info]). Moreover, there can be multiple visual representations of the same program. Even though it is possible to have textual representation —i.e. XML, JSON— they are intended for transportation effects more than visualization and edition.
 
No program is needed, the cartesian product is an intrinsic operation in Fōrmulæ
 
'''Test case 1.''' No commutativity
 
[[File:Fōrmulæ - Cartesian product of two or more lists 01.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 02.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 03.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 04.png]]
 
'''Test case 2.''' With an empty list
 
[[File:Fōrmulæ - Cartesian product of two or more lists 05.png]]
 
[[File:Fōrmulæ - Empty list.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 06.png]]
 
[[File:Fōrmulæ - Empty list.png]]
 
'''Test case 3.''' Extra credit. n-ary cartesian product
 
[[File:Fōrmulæ - Cartesian product of two or more lists 07.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 08.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 09.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 10.png]]
 
[[File:Fōrmulæ - Cartesian product of two or more lists 11.png]]
 
[[File:Fōrmulæ - Empty list.png]]
 
The option to show Fōrmulæ programs and their results is showing images. Unfortunately images cannot be uploaded in Rosetta Code.
-->
=={{header|Go}}==
'''Basic Task'''
2,120

edits