haskell - Meaning of a newtype statement -


i have statement:

newtype state st = state (st -> (st, a)) 

hence type of state is:

state :: (st -> (st, a)) -> state st 

i cannot understand meaning:

  • are st , a placeholder of 2 data-type? right?
  • does statement means state function take argument function?

yes , yes. st state type , a answer type.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -