Dear all,

I found a workaround.  Possibly that also sheds light on why the code
really fails - it seems that one has to "box" functions...

Thanks for your input,

Martin

)abb domain HI HiThere
HiThere(Coef: Ring): SetCategory with
        coerce: (PositiveInteger -> Coef) -> %
        elt: (%, PositiveInteger) -> Coef
    == add
        FUN ==> PositiveInteger -> Coef
        Rep := Record(function: FUN)

        per(a: Rep): % == a pretend %
        rep(a: %): Rep == a pretend Rep

        coerce(f: FUN): % == per [f]

        coerce(a: %): OutputForm == "hi"::OutputForm

        elt(a: %, n: PositiveInteger): Coef ==
            f: FUN := (rep a).function
            f(n)

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to