On Sun, Sep 17, 2017 at 10:24 PM, Ralf Hemmecke <[email protected]> wrote:
> On 09/15/2017 04:23 AM, oldk1331 wrote:
>> 2. subtractIfCan for NNI is very wasteful, the return type
>> Union("failed", NNI) takes 3 times the space than NNI.
>> (type Maybe doesn't have this problem, but that's a different topic)
>
> Can you elaborate on this Maybe type and why it doesn't have that overhead?

In Maybe, we can have
  if R is NNI then
     Rep := Integer
and use -1 to denote failure.  And we can specialize for more types.

> In fact, I'd favour something like "Partial" in Aldor. It would be
> simple to implement and it can be done via the Reference domain of FriCAS.

I believe that's just a difference of name?

> https://github.com/pippijn/aldor/blob/master/aldor/lib/aldor/src/base/sal_partial.as#L92
>
> Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to