Permalink
Browse files

Add docs for Map and Set libraries.

  • Loading branch information...
1 parent 905ddd8 commit c4fd35c921941ff6e691e4e9d0806384ec94cce4 Evan Czaplicki committed Oct 10, 2012
Showing with 33 additions and 0 deletions.
  1. +2 −0 public/Documentation.elm
  2. +17 −0 public/docs/Data/Map.elm
  3. +14 −0 public/docs/Data/Set.elm
View
@@ -8,6 +8,8 @@ standard = ("General Purpose",
[ ("Data.Char", "docs/Data/Char.elm")
, ("Data.Maybe", "docs/Data/Maybe.elm")
, ("Data.List", "docs/Data/List.elm")
+ , ("Data.Map", "docs/Data/Map.elm")
+ , ("Data.Set", "docs/Data/Set.elm")
, ("Prelude", "docs/Prelude.elm")
])
View
@@ -0,0 +1,17 @@
+
+import Website.Docs (createDocs)
+
+basics =
+ [ ("empty", "Map k v", "Create an empty map.")
+ , ("singleton", "k -> v -> Map k v", "Create a map with one key-value pair.")
+ , ("insert", "k -> v -> Map k v -> Map k v", "Insert a key-value pair into a map. Replaces value when there is a collision.")
+ , ("lookup", "k -> Map k v -> Maybe v", "Lookup the value associated with a key.")
+ , ("remove", "k -> Map k v -> Map k v", "Remove a key-value pair from a map. If the key is not found, no changes are made.")
+ , ("member", "k -> Map k v -> Bool", "Determine if a key is in a map.")
+-- , ("keys", "Map k v -> [k]", "Get all of the keys in a map.")
+-- , ("values", "Map k v -> [v]", "Get all of the values in a map.")
+ ]
+
+categories = [ ("Using Maps", basics) ]
+
+main = createDocs "Data.Map" categories
View
@@ -0,0 +1,14 @@
+
+import Website.Docs (createDocs)
+
+basics =
+ [ ("empty", "Set a", "Create an empty set.")
+ , ("singleton", "a -> Set a", "Create a set with one value.")
+ , ("insert", "a -> Set a -> Set a", "Insert a value into a set.")
+ , ("remove", "a -> Set a -> Set a", "Remove a value from a set. If the value is not found, no changes are made.")
+ , ("member", "a -> Set a -> Bool", "Determine if a value is in a set.")
+ ]
+
+categories = [ ("Using Sets", basics) ]
+
+main = createDocs "Data.Set" categories

0 comments on commit c4fd35c

Please sign in to comment.