Tags: penglei/nickel
Tags
Add from/to_tag_and_arg (tweag#1939) * Add from/to_tag_and_arg This commit adds two functions to convert enums to and back from records, as a tag and an optional argument. Such functions are useful to handle enums in a general, dynamic way, while pattern matching requires to know in advance the possible tags. Additionally, we also implement a `map` function, which can be derived from the conversions above. * Update core/stdlib/std.ncl Co-authored-by: jneem <joeneeman@gmail.com> * Update core/stdlib/std.ncl Co-authored-by: jneem <joeneeman@gmail.com> * Update core/stdlib/std.ncl Co-authored-by: jneem <joeneeman@gmail.com> --------- Co-authored-by: jneem <joeneeman@gmail.com>
PreviousNext