100 doors: Difference between revisions

Content deleted Content added
Markjreed (talk | contribs)
→‎{{header|APL}}: Make third solutions produce same output; add note that ⍸ can be added to either.
Langurmonkey (talk | contribs)
Line 7,914: Line 7,914:


Or, we could use the foldfrom() function to produce the output.
Or, we could use the foldfrom() function to produce the output.
<syntaxhighlight lang="langur">writeln foldfrom(fn(.a, .b, .c) if(.b: .a~[.c]; .a), [], .doors, series 1..len .doors)</syntaxhighlight>
<syntaxhighlight lang="langur">writeln foldfrom(fn(.a, .b, .c) { if(.b: .a~[.c]; .a) }, [], .doors, series 1..len .doors)</syntaxhighlight>


=== optimized ===
=== optimized ===