1
edit
m (Link to definition of "shy") |
|||
Line 51: | Line 51: | ||
</source> | </source> | ||
=== Shy results === | === Shy results === | ||
[[Roger Hui]]'s <source lang=apl inline>assert</source> is a dfn that has become the de facto standard when it comes to test suites.<ref>Stefan Kruger. [https://www.dyalog.com/blog/2021/04/2020-problem-solving-competition-phase-ii-highlights/ 2020 Problem Solving Competition – Phase II highlights]. [[Dyalog Ltd.|Dyalog]] blog. April 30, 2021.</ref>. In it, Hui uses both a [[default left argument]] and a final assignment to make the dfn shy: | [[Roger Hui]]'s <source lang=apl inline>assert</source> is a dfn that has become the de facto standard when it comes to test suites.<ref>Stefan Kruger. [https://www.dyalog.com/blog/2021/04/2020-problem-solving-competition-phase-ii-highlights/ 2020 Problem Solving Competition – Phase II highlights]. [[Dyalog Ltd.|Dyalog]] blog. April 30, 2021.</ref>. In it, Hui uses both a [[default left argument]] and a final assignment to make the dfn [[shy]]: | ||
<source lang=apl> | <source lang=apl> | ||
assert ← {⍺←'assertion failure' ⋄ 0∊⍵:⍺ ⎕signal 8 ⋄ shy←0}</source> | assert ← {⍺←'assertion failure' ⋄ 0∊⍵:⍺ ⎕signal 8 ⋄ shy←0}</source> |
edit