git.iko.soy/rowtype-yoga/purescript-backend-optimizer
on main help sign in
27 lines 529 B history raw
1module Snapshot.EffectBind04 where
3import Prelude
5import Effect (Effect)
6import Effect.Class.Console as Console
8test1 :: Effect Int -> Effect Unit
9test1 random = do
10 n <- random
11 if n > 100 then
12 Console.log "Too hot"
13 else if n < 20 then
14 Console.log "Too cold"
15 else
16 Console.log "Just right"
18test2 :: Effect Int -> Effect Unit
19test2 random = do
20 n <- random
21 if n > 100 then
22 Console.log "Too hot"
23 else if n < 20 then
24 Console.log "Too cold"
25 else
26 Console.log "Just right"
27 Console.log "Done"