git.iko.soy/rowtype-yoga/purescript-backend-optimizer
on main help sign in
13 lines 317 B history raw
1module Snapshot.STArray04 where
3import Prelude
5import Control.Monad.ST.Class (liftST)
6import Data.Array.ST as STArray
7import Effect (Effect, foreachE)
9test1 :: forall a b. (a -> b) -> Array a -> Effect Unit
10test1 f as = do
11 bs <- liftST $ STArray.new
12 foreachE as \a ->
13 void $ liftST $ STArray.push (f a) bs