Skip to main content
3 of 9
typo
Adám
  • 31.1k
  • 3
  • 124
  • 287

#Dyalog APL 16.0 (non-competing), 43 37 bytes

Prompts for comment character, then for code.

↑(↓↑((-(⍸'|'∘=),≢)↑¨'|'∘≠⊆⊢)⍞),¨⊂¯2↑⍞

Non-competing because version 16.0's is newer than this challenge.

Adám
  • 31.1k
  • 3
  • 124
  • 287