Exactly three adjacent 3 in lists: Difference between revisions
→{{header|Factor}}: Further simplify the solution and format the output according to the task description
(→{{header|Factor}}: Add a simpler solution) |
(→{{header|Factor}}: Further simplify the solution and format the output according to the task description) |
||
Line 1,022:
</pre>
A somewhat simpler implementation without the fancy statistics and generalizations vocabs.
<syntaxhighlight lang=factor>USING:
{
{ 9 3 3 3 2 1 7 8 5 }
Line 1,029:
{ 1 2 3 4 5 6 7 8 9 }
{ 4 6 8 7 2 3 3 3 1 }
}
{{out}}
<pre>
true
false
false
false
true
</pre>
|