F# higher-order functions on discrete unions -
i trying write rest client in f# uses strongly-typed values define resource "signatures". have decided use discrete unions represent signature list of optional arguments. planning on providing generic way convert parameter value list of tuples represent key/value pairs used create request. learning exercise trying use idomatic f#. i've gotten stuck, trying define 2 different discrete unions have similar signatures. there way me dynamically select right pattern matching function @ runtime? type = | first of string | second of string type b = | first of string | second of string | third of string let createa f s = [a.first f; a.second s;] let createb f s t = [b.first f; b.second s; b.third t] let toparama elem = match elem | a.first f -> "first", f | a.second s -> "second", s let toparamb elem = match elem | b.first f -> "first", f | b.second s -> "second", s...