git.iko.soy/rowtype-yoga/purescript-backend-optimizer
on main help sign in
18 lines 423 B history raw
1module Snapshot.UncurriedEffectFns02 where
3import Prelude
5import Effect (Effect)
6import Effect.Class.Console (logShow)
7import Effect.Uncurried (EffectFn1, mkEffectFn1, runEffectFn1)
9test1 :: Effect Unit
10test1 = runEffectFn1 (mkEffectFn1 \m -> logShow m) 12
12test2 :: Effect Int -> Effect Unit
13test2 random = do
14 let
15 log :: EffectFn1 Int Unit
16 log = mkEffectFn1 \n -> logShow n
17 n <- random
18 runEffectFn1 log n