1) Does this code (in principle) capture the notion of Monad? 2) If yes, is it useful? How to use it? 3) Why doesn't this compile? (Discussion of function versus functor.) 4) Is there another way to write it that does compile and that would be a useful way to represent a monad-like construction in Axiom? 5) What would have to change (if anything) in Axiom to allow it or something similar to compile? 6) Should we be able to pass functors as arguments, store them in variables, etc. the way we do with functions (and as implied in the original Axiom literature)? 7) What type (if any) should be associated with a functor?
Note: Here functor, like function, refers to a constructor that is unapplied but applicable. For example in OpenAxiom you have a Maybe domain presumably modeled after Haskell (or perhaps modeled after whatever the Haskell Maybe type is modeled after). In Haskell Maybe is an example of a monad. (Perhaps not such a good example?) If we could code "monad" explicitly in Axiom and assuming it could be implemented efficiently, could we code domains more general than Maybe without any other special built-in support? Would this allow SPAD to be a more purely functional language? Would that be a good thing? Is this a useless exercise? Maybe we should stop? On Wed, Nov 9, 2011 at 1:37 PM, Gabriel Dos Reis wrote: > Bill Page <bill.p...@newsynthesis.org> writes: > > | Since this is a discussion of Monad and not categories as parameters > | as such, consider instead > | > | Monad(A: SetCategory, M: SetCategory -> SetCategory): Category == with { > | unit: A -> M A; > | mult: M M A -> M A; > | } > > OK, then what is the question? > ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel