import { safeExtract } from "https://deno.land/x/functional@v1.3.4/mod.ts";
safeExtract
String -> Either a -> a
This function takes a message and an Either container; if the container is Either.Right
, the value will be
returned. But if the container is Either.Left
, it will throw an error with the message passed.