> And, since the earlier reference was discussing ocaml implementations,
> I think we can assume that my first post was focusing on the ML
> meaning of functor.

That reference discusses how the Haskell (not ML) meaning of functor
can be implemented (in OCaml).

However, it (as well as the posts in this thread) does not formulate
the sole property that formalizes what it means for Haskell Functor's
fmap to be structure-preserving:

        fmap id ≡ id
        fmap (f ∘ g) ≡ (fmap f) ∘ (fmap g)

for any functions f and g (where ∘ is the composition of functions --
'.' in Haskell, 'o' in ML).  This property is a requirement: without
it, an implementation of fmap, even if signature-complying, does not
make for a functor.  (And this is more or less how the notion of
functor is defined in category theory.)

So, a fmap in J would be any adverb that meets the above conditions.
Of course, we still don't have a functor until we also invent a way
to formally couple such a fmap with the respective data structure.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to