Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 70 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

ngn APL, 7 bytes

{∇⍞←⍞}1

ngn APL only supports linewise input and has no actual looping constructs, so this recursive function is as good as it gets. It prints null bytes, but only if they do not occur on the last line.

How it works

{ } Define a function.
 ⍞←⍞ Read and print a line.
 ∇ Call the function again.
 1 Call the function with dummy input.

exits automatically on EOF.

ngn APL, 7 bytes

{∇⍞←⍞}1

ngn APL only supports linewise input and has no actual looping constructs, so this recursive function is as good as it gets.

How it works

{ } Define a function.
 ⍞←⍞ Read and print a line.
 ∇ Call the function again.
 1 Call the function with dummy input.

exits automatically on EOF.

ngn APL, 7 bytes

{∇⍞←⍞}1

ngn APL only supports linewise input and has no actual looping constructs, so this recursive function is as good as it gets. It prints null bytes, but only if they do not occur on the last line.

How it works

{ } Define a function.
 ⍞←⍞ Read and print a line.
 ∇ Call the function again.
 1 Call the function with dummy input.

exits automatically on EOF.

Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

ngn APL, 7 bytes

{∇⍞←⍞}1

ngn APL only supports linewise input and has no actual looping constructs, so this recursive function is as good as it gets.

How it works

{ } Define a function.
 ⍞←⍞ Read and print a line.
 ∇ Call the function again.
 1 Call the function with dummy input.

exits automatically on EOF.

AltStyle によって変換されたページ (->オリジナル) /