[@bs.module "lodash"] external myMin : array('a) => 'a = "min"; let result = myMin([|1, 2, 3|]); /* result is 1 */
bs.module syntax is not very well documented and a little obtuse.
[@bs.module "lodash"] will turn into the require statement in JS.
external myMin is where you name the function you’ll be using in Reason.
array('a) => 'a declares the type signature and return value.
There are some parentheses missing that might help you read and parse this differently. Here is what the same statement looks like with added parentheses.
[@bs.module("lodash")] external myMin : (array('a) => 'a) = "min";