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
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to