Simple examples: Difference between revisions

Jump to navigation Jump to search
(Remove faulty part)
(→‎Tacit programming: better explanation for the newbies)
Line 48: Line 48:
8.875
8.875
</source>
</source>
This is a so called 3-train, also known as a ''fork''. It is evaluated like this:
{|
|<source lang=apl>(+⌿ ÷ ≢) 3 4.5 7 21</source>|| {{←→}} ||<source lang=apl>(+⌿ 3 4.5 7 21) ÷ (≢ 3 4.5 7 21)</source>
|}
The general scheme for monadic 3-trains is the following:
{|
|<source lang=apl>(f g h) ⍵</source>|| {{←→}} ||<source lang=apl>(f ⍵) g (h ⍵)</source>
|}
But other types of trains are also possible. See [[Tacit programming#Trains|tacit programming]].


==Text processing==
==Text processing==