by neillyons · 2y ago · 0 comments
If `foo` returns `nil`, accessing `bar` won't raise.
get_in(struct, [Access.key(:foo), :bar]) if struct.foo do struct.foo.bar else nil endIt's also very hard to be as concise with more vanilla syntax when competing with put_in/update_in instead. The pattern and ability to generalize it is valuable IME.