-module(given). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([given/3, not_given/3, ok_in/3, ok/3, error_in/3, error/3, some_in/3, some/3, none_in/3, none/3]). -file("/Volumes/Gleam/gleam-given/src/given.gleam", 28). -spec given(boolean(), fun(() -> FVC), fun(() -> FVC)) -> FVC. given(Requirement, Consequence, Alternative) -> case Requirement of true -> Consequence(); false -> Alternative() end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 54). -spec not_given(boolean(), fun(() -> FVD), fun(() -> FVD)) -> FVD. not_given(Requirement, Consequence, Alternative) -> case Requirement of false -> Consequence(); true -> Alternative() end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 76). -spec ok_in({ok, FVE} | {error, FVF}, fun((FVF) -> FVI), fun((FVE) -> FVI)) -> FVI. ok_in(Rslt, Alternative, Consequence) -> case Rslt of {ok, Val} -> Consequence(Val); {error, Err} -> Alternative(Err) end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 98). -spec ok({ok, FVJ} | {error, FVK}, fun((FVK) -> FVN), fun((FVJ) -> FVN)) -> FVN. ok(Rslt, Alternative, Consequence) -> case Rslt of {ok, Val} -> Consequence(Val); {error, Err} -> Alternative(Err) end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 120). -spec error_in({ok, FVO} | {error, FVP}, fun((FVO) -> FVS), fun((FVP) -> FVS)) -> FVS. error_in(Rslt, Alternative, Consequence) -> case Rslt of {error, Err} -> Consequence(Err); {ok, Val} -> Alternative(Val) end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 142). -spec error({ok, FVT} | {error, FVU}, fun((FVT) -> FVX), fun((FVU) -> FVX)) -> FVX. error(Rslt, Alternative, Consequence) -> case Rslt of {error, Err} -> Consequence(Err); {ok, Val} -> Alternative(Val) end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 165). -spec some_in(gleam@option:option(FVY), fun(() -> FWA), fun((FVY) -> FWA)) -> FWA. some_in(Optn, Alternative, Consequence) -> case Optn of {some, Val} -> Consequence(Val); none -> Alternative() end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 188). -spec some(gleam@option:option(FWB), fun(() -> FWD), fun((FWB) -> FWD)) -> FWD. some(Optn, Alternative, Consequence) -> case Optn of {some, Val} -> Consequence(Val); none -> Alternative() end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 211). -spec none_in(gleam@option:option(FWE), fun((FWE) -> FWG), fun(() -> FWG)) -> FWG. none_in(Optn, Alternative, Consequence) -> case Optn of none -> Consequence(); {some, Val} -> Alternative(Val) end. -file("/Volumes/Gleam/gleam-given/src/given.gleam", 234). -spec none(gleam@option:option(FWH), fun((FWH) -> FWJ), fun(() -> FWJ)) -> FWJ. none(Optn, Alternative, Consequence) -> case Optn of none -> Consequence(); {some, Val} -> Alternative(Val) end.