Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %first idea: express new, assign and lookup as lamda terms;
- %sample pseudo code in lam-nb-like notation
- %lookup(assign(new(),succ(zero))).
- %apply deref to a function returning a store, e.g. assign() or new(); (the latter wouldn't succeed, though it is not initialized)
- app(lam(storeName,
- deref(var(storeName))
- ),
- %"assign" lambda abstraction,returns store, takes store and value
- app(lam( storeName,
- app(lam(storeValue,
- assign(var(storeName),var(storeValue))
- ), succ(zero) ) %value to assign
- ),
- %"store" param for "assign"-abstraction: the new-abstraction
- new
- )
- )
- .
Add Comment
Please, Sign In to add comment