Mercurial > hg > Database > jungle-sharp
diff Main/jungle-main/transaction/DefaultJungleTreeEditor.cs @ 33:56de71ae6f7e
Implementation of fmap.
author | Kazuma Takeda |
---|---|
date | Sat, 28 Jan 2017 19:12:18 +0900 |
parents | 1466993c104c |
children | a79781723862 |
line wrap: on
line diff
--- a/Main/jungle-main/transaction/DefaultJungleTreeEditor.cs Fri Jan 20 07:43:43 2017 +0900 +++ b/Main/jungle-main/transaction/DefaultJungleTreeEditor.cs Sat Jan 28 19:12:18 2017 +0900 @@ -50,6 +50,7 @@ JungleTreeEditor newEditor = new DefaultJungleTreeEditor (newNode, txManager, editor, newTreeOpLog); newEditor.SetPrevPath (this.prevPath); + return DefaultEither<Error, JungleTreeEditor>.newB (newEditor); } @@ -77,6 +78,11 @@ return _edit (_path, putAttribute); } + public Either<Error, JungleTreeEditor> putAttribute(NodePath _path, object _value) { + PutAttribute putAttribute = new PutAttribute (_value.ToString(), _value); + return _edit (_path, putAttribute); + } + public Either<Error, JungleTreeEditor> putAttribute(string _key, object _value) { PutAttribute putAttribute = new PutAttribute (_key, _value); return _edit (prevPath, putAttribute);