On 09/26/2017 03:48 AM, oldk1331 wrote: > I tried to replace 'subtractIfCan' as a starter. It turns out more > difficult than I thought. > > https://github.com/oldk1332/fricas/commit/36c1e89856fdd0b634993cc0d202f5fcfd2818ef > > The change itself is not difficult, but there are many compile errors. > I'll try again later. Maybe because 'subtractIfCan' is at the heart > of category tower.
Sorry, I'm a bit late with respect to the discussion about wrap and unwarp. Maybe X is "X \cup \{ failed \}", i.e., it's just one element more, so it's natural that there is an embedding from X to Maybe X. Embeddings in FriCAS go by the name "coerce". The counterpart to coerce is retract: Maybe(X) -> X with the meaning that there is no error checking and if someone does retract(failed), then anything can happen like crashing the computer. Aldor uses [x] to embedd x into its Partial(X) domain. Also OK, but I like coerce somewhat more, because then the FriCAS interpreter could do this coercion if needed. See also the thesis of Nicolas James Doye http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=764504EFF2A238FDA098984AFC303ED7?doi=10.1.1.132.4943&rep=rep1&type=pdf https://lists.gnu.org/archive/html/axiom-developer/2005-09/msg00130.html https://dl.acm.org/citation.cfm?doid=309831.309944 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 fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.