triples( [], _,_,_)->
[];
triples( Self, X, none, none )->
[ Result || Result = { X1, _, _} <- Self, X =:= X1 ];
triples( Self, none, X, none )->
[ Result || Result = { _, X1, _} <- Self, X =:= X1 ];
triples( Self, none, none, X )->
[ Result || Result = { _, _, X1} <- Self, X =:= X1 ];
triples( Self, X, Y, none )->
[ Result || Result = { X1, Y1, _} <- Self, X =:= X1, Y =:= Y1 ];
triples( Self, X, none, Y )->
[ Result || Result = { X1, _, Y1} <- Self, X =:= X1, Y =:= Y1 ];
triples( Self, none, X, Y )->
[ Result || Result = { _, X1, Y1} <- Self, X =:= X1, Y =:= Y1 ].
Refactorings
No refactoring yet !
Ellie
May 1, 2011, May 01, 2011 19:17, permalink
IJWTS wow! Why can't I think of thngis like that?
IJWTS wow! Why can't I think of thngis like that?
Ellie
May 1, 2011, May 01, 2011 19:17, permalink
IJWTS wow! Why can't I think of thngis like that?
IJWTS wow! Why can't I think of thngis like that?
Ellie
May 1, 2011, May 01, 2011 19:17, permalink
IJWTS wow! Why can't I think of thngis like that?
IJWTS wow! Why can't I think of thngis like that?
Ellie
May 1, 2011, May 01, 2011 19:17, permalink
IJWTS wow! Why can't I think of thngis like that?
IJWTS wow! Why can't I think of thngis like that?
Is it possible once refactor this code?