Talk:Function composition: Difference between revisions

mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 32:
|-
! Composition: <tt>∘</tt>
! Unary interpretation: <tt>'''f'''∘'''g''' &nbsp;y</tt>
! Binary interpretation: <tt>x &nbsp;'''f'''∘'''g''' &nbsp;y</tt>
! Notes
|-
Line 77:
|-
|<tt>..</tt>
|<tt>(('''f''' &nbsp;y) &nbsp;+ ('''g''' ''x'')&nbsp;'''f'''('''g''' &nbsp;''y''))/2</tt>
|<tt>((x&nbsp;'''f'''&nbsp;y)&nbsp;+&nbsp;('''g'''&nbsp;''x'')'''f'''('''g'''&nbsp;''y''))/2</tt>
|<tt>N/A</tt>
|Given <tt>'''h'''←'''f'''..'''g'''</tt>, the resulting function, <tt>'''h'''</tt>, is ''even'' in the sense that <tt>('''h''' ''y'') = ('''h''' -''y'')</tt> for any <tt>''y''</tt> ; its graph is reflected in the vertical axis.
|-
|<tt>.:</tt>
|<tt>(('''f''' y) - ('''g''' ''x'')'''f'''('''g''' ''y''))/2</tt>
|<tt>((x&nbsp;'''f'''&nbsp;y)&nbsp;-&nbsp;('''g'''&nbsp;''x'')'''f'''('''g'''&nbsp;''y''))/2</tt>
|<tt>N/A</tt>
|Given <tt>'''h'''←'''f'''.:'''g'''</tt>, the resulting function, <tt>'''h'''</tt>, is ''odd'' in the sense that <tt>('''h''' ''y'') = (-'''h''' -''y'')</tt> for any <tt>''y''</tt> ; its graph is reflected in the origin.
|-
Line 102:
|-
|<tt>''hook''</tt>
|<tt>('''f''' '''g''')''y''</tt> <big>→</big> <tt>''y'' '''f''' '''g''' ''y''</tt>
|
|<tt>''x''('''f''' '''g''')''y''</tt> <big>→</big> <tt>''x'' '''f''' '''g''' ''y''</tt>
|
| To be discussed
|-
|<tt>''fork''</tt>
| composition of <tt>('''h''' '''f''' '''g''')</tt>
|
|
| To be discussed
Line 171:
:::: I didn't mean to suggest that the task or implementation should favor composing lists of functions. I find implementations that allow you to compose multiple functions in a straight-forward manner [eg (compose f #'1+ #'abs #'cos), Mathematica's Compose[f1,f2,f3...] and the J example that you provided] to be more elegant than nesting multiple calls to a composition function [eg (setf f (compose #'1+ (compose #'abs #'cos)))]. --[[User:Lhignight|Larry Hignight]] 09:56, 21 June 2012 (UTC)
: Rdm -- The example looks good. Given your experience with J, are there more advanced examples of function composition that you think should be included in the task description? I think it would be desirable to have easy, moderate and hard example problems. --[[User:Lhignight|Larry Hignight]] 09:56, 21 June 2012 (UTC)
:: There's now a section on this talk page which partially explores this topic. It's a bit sloppy, because the mechanisms are only similar to each other with details which vary between different mechanisms. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 15:23, 4 July 2022 (UTC)
6,951

edits