git.iko.soy/rowtype-yoga/purescript-backend-optimizer
on main help sign in
18 lines 459 B history raw
1module Snapshot.CaseLeafTco where
3import Prelude
5import Data.Array as Array
6import Data.Maybe (Maybe(..))
8test1 :: Boolean -> Array Int -> Array Int
9test1 b arr = case Array.head arr, Array.last arr of
10 Just 1, Just 2 -> arr
11 Nothing, Just y -> arr <> [ y ]
12 Nothing, Nothing -> arr
13 Just x, Nothing -> arr <> [ x ]
14 Just x, Just y ->
15 if b then
16 []
17 else
18 test1 b ([ y, x, 3, y, 5, 6, 7, 8, 9, 10, x, 12, 13, 14, 15, 16, 17 ] <> arr)