Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
added haskell
Line 238:
 
=== Haskell ===
The [[Haskell (programming language)|Haskell]] programming language's providesreport threeonly differentprovides associativeone containers.kind Theof simplestassociative iscontainer: a list of pairs:
 
<pre>
Line 250:
Note that the lookup function returns a "Maybe" value, which is "Nothing" if not found, or "Just ''result''" when found.
 
[[Glasgow Haskell Compiler|GHC]], the most commonly-used implementation of Haskell, provides two more types of associative containers. Other implementations might also provide these.
The second is polymorphic functional maps (represented as immutable balanced binary trees):
 
The secondOne is polymorphic functional maps (represented as immutable balanced binary trees):
 
<pre>