4,494
edits
mNo edit summary |
(→Trains) Tags: Mobile edit Mobile web edit |
||
Line 37: | Line 37: | ||
A [[train]] is a series of functions in isolation. An isolated function is either surrounded by parentheses or named. | A [[train]] is a series of functions in isolation. An isolated function is either surrounded by parentheses or named. | ||
These rules are used for 3-trains: | These rules are used for 3-trains, called [[fork]]s: | ||
{| | {| | ||
|<syntaxhighlight lang=apl> (f g h) ⍵</syntaxhighlight>|| {{←→}} ||<syntaxhighlight lang=apl>( f ⍵) g ( h ⍵)</syntaxhighlight> | |<syntaxhighlight lang=apl> (f g h) ⍵</syntaxhighlight>|| {{←→}} ||<syntaxhighlight lang=apl>( f ⍵) g ( h ⍵)</syntaxhighlight> | ||
Line 50: | Line 50: | ||
|} | |} | ||
In APL (but not [[J]]), these rules are used for 2-trains: | In APL (but not [[J]]), these rules are used for 2-trains, called [[atop]]s: | ||
{| | {| | ||
|<syntaxhighlight lang=apl> (g h) ⍵</syntaxhighlight>|| {{←→}} ||<syntaxhighlight lang=apl>g ( h ⍵)</syntaxhighlight> | |<syntaxhighlight lang=apl> (g h) ⍵</syntaxhighlight>|| {{←→}} ||<syntaxhighlight lang=apl>g ( h ⍵)</syntaxhighlight> | ||
Line 66: | Line 66: | ||
|<syntaxhighlight lang=apl>(⊢ g f) ⍵</syntaxhighlight>|| {{←→}} ||<syntaxhighlight lang=apl>g∘f⍨ ⍵</syntaxhighlight> | |<syntaxhighlight lang=apl>(⊢ g f) ⍵</syntaxhighlight>|| {{←→}} ||<syntaxhighlight lang=apl>g∘f⍨ ⍵</syntaxhighlight> | ||
|} | |} | ||
== Debugging == | == Debugging == |