Hook: Difference between revisions

Jump to navigation Jump to search
12 bytes removed ,  20:41, 8 February 2021
Use pre instead of source tags to avoid highlighting errors
(Style changes to use APL instead of language-specific terminology)
(Use pre instead of source tags to avoid highlighting errors)
Line 8: Line 8:


Like [[Reverse Compose]], the two hooks can be used together to form a [[split-compose]] construct.
Like [[Reverse Compose]], the two hooks can be used together to form a [[split-compose]] construct.
<source>
<pre>
     3‿¯1‿4 ×⊸×⟜| ¯2‿¯7‿1
     3‿¯1‿4 ×⊸×⟜| ¯2‿¯7‿1
⟨ 2 ¯7 1 ⟩
⟨ 2 ¯7 1 ⟩
</source>{{Works in|[[BQN]]}}
</pre>{{Works in|[[BQN]]}}
This definition behaves differently that the Compose-based one when only one argument is given: in that case, it becomes a monadic 3-[[train]].
This definition behaves differently that the Compose-based one when only one argument is given: in that case, it becomes a monadic 3-[[train]].


The name "hook" was chosen based on the hook shape of a function call diagram such as the one below, taken from ''Phrasal Forms''.
The name "hook" was chosen based on the hook shape of a function call diagram such as the one below, taken from ''Phrasal Forms''.
<source>
<pre>
⍺(fg)⍵ ←→ ⍺fg⍵
⍺(fg)⍵ ←→ ⍺fg⍵


Line 23: Line 23:
         \
         \
         ⍵
         ⍵
</source>
</pre>


== See also ==
== See also ==

Navigation menu