Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のようなグラフがあり、それを次のよう[("a","b"),("a","c"),("a","d"),("b","e"),("c","f"),("d","e"),("e","f"),("e","g"),("f","d")]に変換する必要があります。
[("a","b"),("a","c"),("a","d"),("b","e"),("c","f"),("d","e"),("e","f"),("e","g"),("f","d")]
[("a",["b","c","d"]),("b",["e"]) ...]
大学のプロジェクトなので、高次関数と Data.List しか使えません
誰でも私を助けることができますか?
ありがとう
これは宿題なので、ヒントだけを示します。 を見てくださいData.List.groupBy。
Data.List.groupBy