mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-10-26 05:50:18 +03:00
14 lines
197 B
Plaintext
14 lines
197 B
Plaintext
type Pair = (new a b)
|
|
|
|
type State:
|
|
new { a, b }
|
|
|
|
def with_state(x, s):
|
|
open State: s
|
|
return Pair/new(s, x(s.a))
|
|
|
|
main =
|
|
let x = (with_state @x x (State/new 1 2))
|
|
open Pair x;
|
|
{x.a x.b}
|