mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-13 09:55:35 +03:00
14 lines
304 B
Plaintext
14 lines
304 B
Plaintext
--State4 ability
|
|
structural ability State se2 where
|
|
put : ∀ se . se -> {State se} ()
|
|
get : ∀ se . () -> {State se} se
|
|
-- binding is not guarded by a lambda, it only can access
|
|
-- ambient abilities (which will be empty)
|
|
ex1 : {State Int} ()
|
|
ex1 =
|
|
y = State.get
|
|
State.put (y Int.+ +1)
|
|
()
|
|
()
|
|
|