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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -