Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about starray

Read more about starray

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - starray

Two almost identical functions using STArray: why does one requires FlexibleContexts, and the other does not?

Consider the Haskell functions test :: ST s [Int] test = do arr <- newListArray (0,9) [0..9] :: ST s (STArray s Int Int) let f i = do writeArray arr i (2*i) readArray arr i...
test-img

Mark Wildon

arrays

haskell

state-monad

starray

Votes: 0

Answers: 1

Latest Answer

You can check which type GHC assigns to f in GHCi: ghci> import Data.Array ghci> import Data.Array.MArray ghci> let arr :: STArray s Int Int; arr = undefined ghci> :t \i -> do writeArra...
test-img

Noughtmare

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved