Tacit programming: Difference between revisions

Jump to navigation Jump to search
415 bytes added ,  00:55, 1 September 2022
m
Trains as function composition
m (→‎Conversion to dfns: "= would indicate a monadic function" correction)
m (Trains as function composition)
Line 55: Line 55:
|<source lang=apl>⍺ (g h) ⍵</source>|| {{←→}} ||<source lang=apl>g (⍺ h ⍵)</source>
|<source lang=apl>⍺ (g h) ⍵</source>|| {{←→}} ||<source lang=apl>g (⍺ h ⍵)</source>
|}
|}
Any train can be expressed in terms of function composition - except dyadic forks. Some common patterns are:
{|
|<source lang=apl>(f g h) ⍵</source>|| {{←→}} ||<source lang=apl>g⍨∘f⍨∘h⍨ ⍵</source>
|-
|<source lang=apl>(f g f) ⍵</source>|| {{←→}} ||<source lang=apl>g⍥f⍨ ⍵</source>
|-
|<source lang=apl>(⊢ g f) ⍵</source>|| {{←→}} ||<source lang=apl>g∘f⍨ ⍵</source>
|}


== Debugging ==
== Debugging ==
trusted
46

edits

Navigation menu