[Haskell-beginners] Re: Beginners Digest, Vol 29, Issue 41

Stephen Tetley stephen.tetley at gmail.com
Fri Nov 26 15:51:46 EST 2010

On 26 November 2010 20:21, Ozgur Akgun <ozgurakgun at gmail.com> wrote:

> Not monad, but 'knot's :)
> If you tie the knot while creating those values, then, you don't need to
> update the same information in several places.

Oooh, masochism.

I'd be prefer not to make the data cyclic in the first place. Cyclic
structures are painful in functional languages - if you need them
there are ways to do it[*] but I would try to design around them.

Here I'd make a separate data type for the relation between course
name and student name (or better yet UIDs), rather than embed the data
in Course and Student objects.

[*] There was a "zipper-graph" paper by Normay Ramsey and colleagues
at the ML workshop a few years ago with one way to do it.

More information about the Beginners mailing list