Hook: Difference between revisions
Jump to navigation
Jump to search
(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. | ||
< | <pre> | ||
3‿¯1‿4 ×⊸×⟜| ¯2‿¯7‿1 | 3‿¯1‿4 ×⊸×⟜| ¯2‿¯7‿1 | ||
⟨ 2 ¯7 1 ⟩ | ⟨ 2 ¯7 1 ⟩ | ||
</ | </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''. | ||
< | <pre> | ||
⍺(fg)⍵ ←→ ⍺fg⍵ | ⍺(fg)⍵ ←→ ⍺fg⍵ | ||
Line 23: | Line 23: | ||
\ | \ | ||
⍵ | ⍵ | ||
</ | </pre> | ||
== See also == | == See also == |