cryptol-2.9.1: Cryptol: The Language of Cryptography

Copyright(c) 2014-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Cryptol.Utils.Misc

Description

 
Synopsis

Documentation

anyJust :: Traversable t => (a -> Maybe a) -> t a -> Maybe (t a) Source #

Apply a function to all elements of a container. Returns Nothing if nothing changed, and Just container otherwise.

anyJust2 :: (a -> Maybe a) -> (b -> Maybe b) -> (a, b) -> Maybe (a, b) Source #

Apply functions to both elements of a pair. Returns Nothing if neither changed, and Just pair otherwise.