Compare a list of strings: Difference between revisions
Content added Content deleted
(correct ordering) |
(correct ordering again) |
||
Line 475: | Line 475: | ||
1 |
1 |
||
</pre> |
</pre> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | [https://mlochbaum.github.io/BQN/try.html#code=QWxsRXEg4oaQIOKNi+KJoeKNkgpBc2Mg4oaQIMKs4oiYQWxsRXHiiKfiiKfiiaHiiqIKCuKAolNob3cgQWxsRXEg4p+oIkFBIiwgIkFBIiwgIkFBIiwgIkFBIuKfqQrigKJTaG93IEFzYyDin6giQUEiLCAiQUEiLCAiQUEiLCAiQUEi4p+pCgrigKJTaG93IEFsbEVxIOKfqCJBQSIsICJBQ0IiLCAiQkIiLCAiQ0Mi4p+pCuKAolNob3cgQXNjIOKfqCJBQSIsICJBQ0IiLCAiQkIiLCAiQ0Mi4p+pCg== Try It!] |
||
=={{header|Bracmat}}== |
=={{header|Bracmat}}== |
||
Line 503: | Line 523: | ||
In words, the tests do the following: test1 assigns the first element of the argument to the "first" and then looks for another element that is not equal to "first". If the search succeeds, test1 fails and if the search fails, test1 succeeds. Test2 searches for two consecutive elements where the second element is not greater than the first elemnt. If the search succeeds, test2 fails and if the search fails, test2 succeeds. |
In words, the tests do the following: test1 assigns the first element of the argument to the "first" and then looks for another element that is not equal to "first". If the search succeeds, test1 fails and if the search fails, test1 succeeds. Test2 searches for two consecutive elements where the second element is not greater than the first elemnt. If the search succeeds, test2 fails and if the search fails, test2 succeeds. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | [https://mlochbaum.github.io/BQN/try.html#code=QWxsRXEg4oaQIOKNi+KJoeKNkgpBc2Mg4oaQIMKs4oiYQWxsRXHiiKfiiKfiiaHiiqIKCuKAolNob3cgQWxsRXEg4p+oIkFBIiwgIkFBIiwgIkFBIiwgIkFBIuKfqQrigKJTaG93IEFzYyDin6giQUEiLCAiQUEiLCAiQUEiLCAiQUEi4p+pCgrigKJTaG93IEFsbEVxIOKfqCJBQSIsICJBQ0IiLCAiQkIiLCAiQ0Mi4p+pCuKAolNob3cgQXNjIOKfqCJBQSIsICJBQ0IiLCAiQkIiLCAiQ0Mi4p+pCg== Try It!] |
||
<lang Bracmat> (test1=first.~(!arg:%@?first ? (%@:~!first) ?)) |
<lang Bracmat> (test1=first.~(!arg:%@?first ? (%@:~!first) ?)) |