Partition: Difference between revisions

Jump to navigation Jump to search
84 bytes added ,  10:57, 27 January 2020
m
no edit summary
No edit summary
mNo edit summary
Line 8: Line 8:
└──┴─────┘
└──┴─────┘
</source>
</source>
{{Works in|[[Dyalog APL]]}}
Right argument elements can be skipped by having their corresponding left argument element be 0:
Right argument elements can be skipped by having their corresponding left argument element be 0:
<source lang=apl>
<source lang=apl>
Line 15: Line 16:
└──┴───┘
└──┴───┘
</source>
</source>
{{Works in|[[Dyalog APL]]}}
In the case where the left argument is [[Boolean]], Partition splits its right argument on runs of 0s in the left argument, allowing a very short split-on-delimiter function:
In the case where the left argument is [[Boolean]], Partition splits its right argument on runs of 0s in the left argument, allowing a very short split-on-delimiter function:
<source lang=apl>
<source lang=apl>
Line 26: Line 28:
└───┴───┴────┘
└───┴───┴────┘
</source>
</source>
{{Works in|[[Dyalog APL]]}}
{{APL built-ins}}
{{APL built-ins}}

Navigation menu