2 ms·
Yes, you can solve it quite simply with an active pattern, or type union. The fundamental problem with the problem is that it's a relational problem and polymo
by fleitz 16y ago
Yes, you can solve it quite simply with an active pattern, or type union. The fundamental problem with the problem is that it's a relational problem and polymorphism largely solves hierarchical problems. This type of problem also solves easily in prolog. The solution to the problem in java is to create some kind of relation class that abstracts the state of the relationship to between individuals/groups.