1module Main where 2 3import Prelude 4import Effect 5import Effect.Console 6import Data.Array 7import Data.Array.Partial as P 8import Partial.Unsafe 9 10length :: forall a. Array a -> Int 11length = go 0 where 12 go acc arr = 13 if null arr 14 then acc 15 else go (acc + 1) (unsafePartial P.tail arr) 16 17main = do 18 logShow (length (1 .. 10000)) 19 log "Done" 20