Arwyn's pub question about a common functional pattern

12 views
Skip to first unread message

ja...@ioctl.org

unread,
Mar 27, 2013, 4:24:10 AM3/27/13
to brisfun...@googlegroups.com
I don't know if everyone caught it, but as Arwyn and I were discussing our
ongoing constraint satisfaction experiments, we were stumped in finding a
name for the following function pattern:

(f') . g . f (f' the inverse of f)

which crops up in many contexts in mathematics.

In the case in question, the pattern as a whole was applied to a complex
data structure; f pulled the data structure apart (excuse me if I'm vague
about this) and f' put it back together, after g had operated on the part
focused on.

It occurs to me that one way to look at this kind of thing in particular
is as *lifting* g into the data structure pulled apart (and rebuilt) by
f/f': but (perhaps unusually) the formulation focuses on transforming out
of, then back into, the containing structure. In other words, this seems
to actually be skirting awfully close to fmap (and maybe even the 'm'
word*)... perhaps why it's familiar in the FP context?



* lending credence to the claim that monads are such a useful notion
that even if you didn't know what they were you'd _still_ reinvent them.

--
Update your address books: ja...@ioctl.org http://ioctl.org/jan/
Not as randy or clumsom as a blaster.

Arwyn

unread,
Apr 11, 2013, 8:08:56 AM4/11/13
to brisfun...@googlegroups.com
Hi Jan,

Following your train of thought I went looking in category theory for something like this.
This presentation was actually making sense until my brain fried.
Sorry about the cats.

Also, for those who haven't seen this already:
Functional Javascript by Michael Fogus: 

Cheers,
Arwyn
Reply all
Reply to author
Forward
0 new messages