Hash join: Difference between revisions
Content added Content deleted
m (→{{header|zkl}}: misc) |
(rearranges in order of the language.) |
||
Line 362: | Line 362: | ||
[ [ 18 "Alan" ] [ "Alan" "Zombies" ] ] |
[ [ 18 "Alan" ] [ "Alan" "Zombies" ] ] |
||
[ [ 28 "Glory" ] [ "Glory" "Buffy" ] ] |
[ [ 28 "Glory" ] [ "Glory" "Buffy" ] ] |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
</pre> |
</pre> |
||
Line 475: | Line 443: | ||
</lang> |
</lang> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Go}}== |
=={{header|Go}}== |
||
Line 981: | Line 981: | ||
28 4 Glory 35 Buffy |
28 4 Glory 35 Buffy |
||
</pre> |
</pre> |
||
=={{header|Oberon-2}}== |
=={{header|Oberon-2}}== |
||
Works with oo2c version 2 |
Works with oo2c version 2 |
||
Line 1,089: | Line 1,090: | ||
28 Glory Buffy |
28 Glory Buffy |
||
</pre> |
</pre> |
||
=={{header|OCaml}}== |
=={{header|OCaml}}== |
||
This exploits the fact that Hashtbl implements a hash table that can store multiple values for a key, for an especially simple solution: |
This exploits the fact that Hashtbl implements a hash table that can store multiple values for a key, for an especially simple solution: |
||
Line 1,474: | Line 1,476: | ||
[[28, "Glory"], ["Glory", "Buffy"]] |
[[28, "Glory"], ["Glory", "Buffy"]] |
||
</pre> |
</pre> |
||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
<lang Scala>def join[Type](left: Seq[Seq[Type]], right: Seq[Seq[Type]]) = { |
<lang Scala>def join[Type](left: Seq[Seq[Type]], right: Seq[Seq[Type]]) = { |
||
Line 1,502: | Line 1,505: | ||
List(28, Alan, Ghosts) |
List(28, Alan, Ghosts) |
||
List(28, Alan, Zombies)</pre> |
List(28, Alan, Zombies)</pre> |
||
=={{header|Scheme}}== |
=={{header|Scheme}}== |