Perhaps needs more specification – a concrete and focused task ?
Always helpful (for any useful contrast / comparability of submissions) to have a problem to solve, and a suggested input, with expected output.
e.g. the definition and use of something like the Haskell either function, which performs case analysis on a sum type value, applying one function if the value is a 'Left', and another if the value is a 'Right'. Hout (talk) 11:17, 25 June 2019 (UTC)