1-----------------------------------------------------------------------------
3-- Module : Language.PureScript.Traversals
4-- Copyright : (c) 2014 Phil Freeman
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
11-- | Common functions for implementing generic traversals
13-----------------------------------------------------------------------------
15module Language.PureScript.Traversals where
17import Control.Applicative
19fstM :: (Functor f) => (a -> f c) -> (a, b) -> f (c, b)
20fstM f (a, b) = flip (,) b <$> f a
22sndM :: (Functor f) => (b -> f c) -> (a, b) -> f (a, c)
23sndM f (a, b) = (,) a <$> f b
25maybeM :: (Applicative f) => (a -> f b) -> Maybe a -> f (Maybe b)
26maybeM _ Nothing = pure Nothing
27maybeM f (Just a) = Just <$> f a
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list