Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
let keys = [ "foo"; "bar"; "baz" ]
|
||||
and vals = [ 16384; 32768; 65536 ]
|
||||
and hash = Hashtbl.create 0;;
|
||||
|
||||
List.iter2 (Hashtbl.add hash) keys vals;;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
let keys = [| "foo"; "bar"; "baz" |]
|
||||
and vals = [| 16384; 32768; 65536 |]
|
||||
and hash = Hashtbl.create 0;;
|
||||
|
||||
Array.iter2 (Hashtbl.add hash) keys vals;;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
module StringMap = Map.Make (String);;
|
||||
|
||||
let keys = [ "foo"; "bar"; "baz" ]
|
||||
and vals = [ 16384; 32768; 65536 ]
|
||||
and map = StringMap.empty;;
|
||||
|
||||
let map = List.fold_right2 StringMap.add keys vals map;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue