Yes. f somedata1 somedata2 = aa where aa = AA somedata1 bb bb = BB somedata2 aa
2009/1/29 Belka <lambda-be...@yandex.ru>: > > Hello! > I'm puzzled, if in Haskell it's possible to create a (pure) data structure, > consisting of 2 substructures referencing each other: > ------------------------- > data AA = AA { > someData1 :: SomeData1 > bb :: BB > } > > data BB = BB { > someData2 :: SomeData2 > aa :: AA > } > > f :: SomeData1 -> SomeData2 -> AA > f somedata1 somedata2 = ?????????? > > -- Always True: > ghci> f == aa $ bb f > True > ------------------------- > Any ideas? > > Belka > -- > View this message in context: > http://www.nabble.com/Recursive-referencing-tp21722002p21722002.html > Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Евгений Кирпичев Разработчик Яндекс.Маркета _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe