I noticed there is a new wiki page: http://axiom-wiki.newsynthesis.org/FunctionalProgramming
First, an example: Polynomial in FriCAS is functional: its Rep is List of Record, but there are no functions can modify its content (no destructive functions), so it's actually an immutable data structure. So functions such as add (+) returns shared structure. So functional programming = shared structure + no destructive function. However, FriCAS has little support for functional programming, the Polynomial example works because List in Spad (list in lisp) happens to have a functional subset (rest/cdr returns shared structure). For other data structures, functional version is not a subset of imperative version: they often have different Rep. So, for imperative data structure, non destructive function should not modify its argument or return shared structure. Actually, most functions exported by imperative data structure should be destructive, and it's user's responsibility to make copies when necessary. -- 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.
