Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to add a function to hashtable and call it from find

26 views
Skip to first unread message

davidbe...@gmail.com

unread,
Feb 23, 2016, 7:41:34 AM2/23/16
to
Error: Unbound value mappedfunc

how to write generic function which has generic parameters
and add to hashtable?

let f000 () = print_endline "000"
let f001 () = print_endline "001"
let f002 () = print_endline "002"
let f003 () = print_endline "003"
let f004 () = print_endline "004"

let mappedfunc = Hashtbl.create 100000;

Hashtbl.add mappedfunc "000" f000;

Hashtbl.find mappedfunc "000";
0 new messages