1module Snapshot.EffectRefs01 where
7import Effect.Ref as Ref
9test1 :: Effect (Ref Int)
12test2 :: forall a. (Int -> a) -> Effect (Ref a)
13test2 g = Ref.new (g 42)
15test3 :: forall a. Ref a -> Effect a
18test4 :: forall a b. (a -> Ref b) -> a -> Effect b
19test4 g r = Ref.read (g r)
21test5 :: Ref Int -> Effect Unit
22test5 r = Ref.write 42 r
24test6 :: forall a. (Int -> a) -> Ref a -> Effect Unit
25test6 g r = Ref.write (g 42) r
27test7 :: forall a. (a -> a) -> Ref a -> Effect a
28test7 g r= Ref.modify g r
30test8 :: forall a. (forall b. b -> b) -> Ref a -> Effect a
31test8 g r = Ref.modify (g g) r
33test9 :: (Int -> Int) -> Effect Int
37 Ref.write (prev + 1) ref
38 _ <- Ref.modify (add 1) ref
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