Skip to content

Instantly share code, notes, and snippets.

@tarquin-the-brave
Created May 12, 2020 12:25
Show Gist options
  • Save tarquin-the-brave/82d2f51efb195adc1a2f1e70ea11c82d to your computer and use it in GitHub Desktop.
Save tarquin-the-brave/82d2f51efb195adc1a2f1e70ea11c82d to your computer and use it in GitHub Desktop.
foldFunction' :: (a -> c -> Either a b) -> Either a b -> c -> Either a b
foldFunction' _ Left x _ = Left x
foldFunction' f (Right acc) x = f acc x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment