Grzegorz wrote: > apfelmus <apfelmus <at> quantentunnel.de> writes: > > [ .. lengthy discussion and implementation .. ] > >> As an example, we have >> >> Just "Earth" == lookup (at "Milky Way" </> at "Sun") universe >> >> assuming that >> >> universe :: Data.Map String (Data.Map String String) > > All this hard work for something that in a lesser language would be the > unimpressive: universe["Milky Way"]["Sun"] ;-P
Yo, and the lesser language surely has first-class keys as in do let worstCaseScenario k = forM_ parallelUniverses $ destroySystem k worstCaseScenario ["Milky Way"]["Sun"] , right. Right? Hopefully not ;) The Haskell version is safe though, as the old universes are still in memory because there's no update in place. Very useful in case the imperative imperator decides to segfault the space-time continuum and thus destroys this and all parallel worlds. Don't worry, the old ones are still there. Regards, apfelmus _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe