1-- @inline Snapshot.RecursionSchemes01.cata arity=2
2-- @inline Snapshot.RecursionSchemes01.functorExprF.map arity=2
3module Snapshot.RecursionSchemes01 (Fix, ExprF, test1, test2) where
7newtype Fix f = Fix (f (Fix f))
9data ExprF a = Add a a | Mul a a | Lit Int
11derive instance Functor ExprF
15eval :: ExprF Int -> Int
21bump :: ExprF Int -> ExprF Int
26cata :: forall f a. Functor f => (f a -> a) -> Fix f -> a
29 go (Fix f) = alg (map go f)
35test2 = cata (eval <<< bump)
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