Skip to content

Instantly share code, notes, and snippets.

@Nucleareal
Created February 23, 2014 14:04
Show Gist options
  • Save Nucleareal/9171905 to your computer and use it in GitHub Desktop.
Save Nucleareal/9171905 to your computer and use it in GitHub Desktop.
誰かArrayを使用するのはそのままにして最適化しといてください(他力本願寺)
import Data.Array
import Control.Monad
main = do
let arr = array (0, 99999) [(i, 0) | i <- [0..99999]]
forM [0..99999] (\i -> do
let new = arr // [(i, i)]
putStrLn . show $ new!i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment