[erlang-questions] If you are homesick for object.selector

Ulf Wiger <>
Thu Jan 24 21:24:20 CET 2013

On 24 Jan 2013, at 10:12, Olav Frengstad wrote:

> {Get,Set} = compose([#char.cur_weapon, #weapon.ability, #ability.points_req]),
> Character2 = S(123, Character),
> 123 = G(Character2).
> Jesper Louis Andersen wrote a simple Erlang implementation which can
> be found here: https://github.com/jlouis/erl-lenses

I noticed this was posted on the list quite a while ago, but I missed it then.

I have added lens support in exprecs, with reference in the docs to 
Jesper's erl-lenses project:

Eshell V5.9.2  (abort with ^G)
1> test_exprecs:'#lens-'(a,r).

2> {G,S} = v(1).

3> R = test_exprecs:'#new-r'().  

4> G(S(17,R)).

5> S(17,R).

Pushed to http://github.com:uwiger/parse_trans.git

Ulf W

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.

More information about the erlang-questions mailing list