1{-# OPTIONS_GHC -Wall #-}
4 , empty, singleton, cons, append, map
10import Prelude hiding (map)
29singleton :: a -> Bag a
34cons :: a -> Bag a -> Bag a
44append :: Bag a -> Bag a -> Bag a
57map :: (a -> b) -> Bag a -> Bag b
67 Two (map func left) (map func right)
77fromList :: [a] -> Bag a
82toList :: (a -> b) -> Bag a -> [b]
84 toListHelp func bag []
87toListHelp :: (a -> b) -> Bag a -> [b] -> [b]
88toListHelp func bag list =
97 toListHelp func left (toListHelp func right list)
100 foldr (\x newList -> func x : newList) list xs
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