    output :- From "The Semantic Elegance of Applicative Languages"
              (Turner 1981), Say
              output!
              to enumerate paraffins;
    output = layn (concat (map paraffin [1..]))

    paraffin n = quotient equiv {[x,"H","H","H"]|x<-para (n - 1)}

    para = map genpara [0..]

    genpara 0 = ["H"]
    genpara n = {[a,b,c]|i<-[0..(n - 1) / 3];j<-[i..(n - 1 - i) / 2];a<-para i;b<-para j;c<-para (n - 1 - i - j)}

    equiv a b = member (equivclass a) b

    equivclass x = closure_under_laws [invert,rotate,swap] [x]

    invert [[a,b,c],d,e,f] = [a,b,c,[d,e,f]]
    invert x = x, x 0 == "H"

    rotate [a,b,c,d] = [b,c,d,a]

    swap [a,b,c,d] = [b,a,c,d]

    closure' f s t = closure'' f s (mkset {a|f'<-f;a<-map f' t;\member s a})

    closure'' f s t = [], t == []
                    = t ++ closure' f (s ++ t) t

    closure_under_laws f s = s ++ closure' f s s

    quotient f (a:x) = a:{b|b<-quotient f x;\f a b}
    quotient f [] = []
