Talk:Function composition: Difference between revisions

(functional composition in J)
Line 38:
|<tt>'''f'''(''x'' '''g''' ''y'')</tt>
|<tt>'''f'''</tt> applied to each output of <tt>'''g'''</tt> independently
|-
|<tt>@.</tt>
|
|
| To be discussed
|-
|<tt>@:</tt>
Line 48 ⟶ 53:
|<tt>('''g''' ''x'')'''f'''('''g''' ''y'')</tt>
|<tt>'''f'''</tt> applied between each output of <tt>'''g'''</tt> on <tt>''x''</tt> and <tt>''y''</tt> pairwise
|-
|<tt>&.</tt>
|
|
| To be discussed
|-
|<tt>&.:</tt>
|
|
| To be discussed
|-
|<tt>&:</tt>
Line 53 ⟶ 68:
|<tt>('''g''' ''x'')'''f'''('''g''' ''y'')</tt>
|<tt>'''f'''</tt> applied between all outputs of <tt>'''g'''</tt> on <tt>''x''</tt> and <tt>''y''</tt> ''in toto''
|-
|<tt>.</tt>
|
|
| To be discussed
|-
|<tt>..</tt>
Line 69 ⟶ 89:
| Allows the unary and binary definitions of a function to be specified independently.
|-
|<tt>::.</tt>
|
|<tt>try { '''f''' ''y'' } catch { '''g''' ''y'' } </tt>
|
|<tt>try { ''x'' '''f''' ''y'' } catch { ''x'' '''g''' ''y'' } </tt>
| To be discussed
| Given <tt>'''h'''←'''f'''::'''g'''</tt>, if <tt>'''f'''</tt> returns a valid value without error, then the result of <tt>'''h'''</tt> is the result of <tt>'''f'''</tt>; else, the result of <tt>'''h'''</tt> is the result of <tt>'''g'''</tt>. These succinct, functional exception handlers can be chained.
|-
|<tt>::</tt>
Line 78 ⟶ 98:
|<tt>try { ''x'' '''f''' ''y'' } catch { ''x'' '''g''' ''y'' } </tt>
| Given <tt>'''h'''←'''f'''::'''g'''</tt>, if <tt>'''f'''</tt> returns a valid value without error, then the result of <tt>'''h'''</tt> is the result of <tt>'''f'''</tt>; else, the result of <tt>'''h'''</tt> is the result of <tt>'''g'''</tt>. These succinct, functional exception handlers can be chained.
|-
|<tt>''hook''</tt>
|
|
| To be discussed
|-
|<tt>''fork''</tt>
|
|
| To be discussed
|-
|}
 
===Still to discuss===
 
::<tt>@.</tt> = functional selection (<tt>'''f'''`'''g'''@.'''h'''</tt>)
Discuss
@::<tt>&. (</tt> = ''under'f', this is a ''`good'''g'''@ one.'''h'''</tt>)
::<tt>&.:</tt> = <tt>&.:</tt> is to <tt>&.</tt> as <tt>&:</tt> is to <tt>&.</tt>
&.
::<tt>.</tt> = (<tt>'''f'''.'''g'''</tt> is defined in terms of a recursive expansion by minors along the first column when unary, and as a generalized inner product when binary.
&.:
::<tt>:.</tt> = related to <tt>&.</tt>, another good one.
. (<tt>'''f'''.'''g'''</tt> is defined in terms of a recursive expansion by minors along the first column when unary, and as a generalized inner product when binary
::hook = an implicit composition of 2 functions
::)
::fork = an implicit composition of 3 functions
:. (obverse)
fork
hook
Anonymous user