I've been asked whether a particular combinator can be written readily in J without relying on verb trains. I've replied in the negative, but I'd like to put this before the J community so that my answer may be corrected if wrong, or perhaps supplemented.
Here is the entire conversation between me and Conal Elliott, to date: TH: Rereading John Backus 1977; section 12.9 stands out. Is that aspect of this much-lauded paper applied in Haskell? ... Does Haskell follow Backus' advice (esp. 12.9)? CE: I love that backus paper. which advice in 12.9 in particular? TH: I hear Backus advise an algebraic form, more restrictive than systems of Church or Curry, so that equivalence (e.g.) is more plain. CE: I hear the same. Haskell does not follow that advice. TH: Backus' example is [f , g]o h = [f o h , g o h] which I can write in J as (f;g)@h -: (f...@h;g...@h) How would I code it in Haskell? CE: it's called (&&&) in haskell and works for all arrows. on functions, it's (f &&& g) x = (f x , g x). See http://bit.ly/11G2IH . and yes, (f &&& g) . h == (f . h &&& g . h) TH: Thanks for identifying (&&&). I think there is no equiv. symbol in J. Instead, that meaning is implied syntactically; called "fork". CE: if "fork" weren't already in J, could you define it and use it conveniently? TH: No. J's verb trains (e.g. fork) allow separation-and-rejoining to be put in terms of functions, not structures of resulting values. My question to the J forum is: Have I erred or overlooked anything? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
