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
Post a Comment