Skip to content

Instantly share code, notes, and snippets.

@beezee
Last active December 15, 2019 22:17
Show Gist options
  • Save beezee/333c61af10f166b7490f82c7414f4ad5 to your computer and use it in GitHub Desktop.
Save beezee/333c61af10f166b7490f82c7414f4ad5 to your computer and use it in GitHub Desktop.
new oq, qr, n, req. (Init[oq, req] | S[oq, qr] | I[qr, n] | F[n])
S[oq, qr] := oq(req).new query.S_query[qr, query]
S_query[qr, query] := qr<query>.S[qr, qr]
I[qr, n] := qr(query).new response.I_notice[qr, n, response]
I_notice[qr, n, response] := n<response>.I_respond[qr, n, response]
I_respond[qr, n, resp] := qr<resp>.I[qr, n]
F[n] := n(resp).F_recv[n]
F_recv[n] := τ.F[n]
Init[qr, req] := qr<req>
{
"showLabels": "true"
}
new cxn, req. (Init[cxn, req] | S[cxn] | I[cxn])
S[cxn] := cxn(req).new query.S_query[cxn, query]
S_query[cxn, query] := cxn<query>.S[cxn]
I[cxn] := cxn(query).new response.I_respond[cxn, response]
I_respond[cxn, resp] := cxn<resp>.I[cxn]
Init[cxn, req] := cxn<req>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment