1module Snapshot.CaseGuarded where
4import Data.Maybe (Maybe(..))
5import Data.Either (Either(..))
10 | n < 1 -> "n: " <> show n
13 , x < 100 -> "1 < x < 100: " <> show x
16 , x < 50 -> "1 < x < 50: " <> show x
18 | otherwise -> "catch"
20newtype NInt = NInt Int
29data Product3 a b c = Product3 a b c
31test3 :: Product3 Int Int Int -> Int
33 Product3 a b _ | a == b -> a
34 Product3 a b c | c == b -> a
35 Product3 a _ c | a == c -> c
39 :: { a :: Int, b :: Int, c :: Int }
40 -> { d :: Int, e :: Int, f :: Int }
43 { a: 1 }, { d: 1 } -> 1
46 { a: 1 }, { d: 4 } -> 4
47 { a: 1 }, { d: 5 } -> 5
48 { a: 2 }, { d: 1 } -> 6
53 { b: 2 }, { d: 1, f: 10 } -> 10
54 { c }, { f } -> 11 + c + f
56test5 :: Maybe (Either Int Int) -> Int
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