> I would rather add a function retractable?: % -> Boolean that does
> exactly such a check and transform the specification into:

Errr... Wouldn't that be something like
  retractIfCan : % -> Maybe R

Which is a total function.

Which means Maybe is more fundamental than RetractableTo.

Which means Maybe should not export 'retract', because
Maybe/unwrap is more fundamental than
RetractableTo/retract/retractIfCan.

> I'd be actually happier if -> only denotes total functions

If that's what you want, you should not try to restrict the input,
instead return Maybe as output.  But for fundamental Maybe
domain itself, well, something has to be non total.  But you
can use map/unwrapOr or bind from Monad which are total.

-- 
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