Strip block comments: Difference between revisions

Content added Content deleted
m (Added the Sidef language)
Line 704: Line 704:


=={{header|Haskell}}==
=={{header|Haskell}}==
THE FOLLOWING SOLUTION IS WRONG, as it does not take string literals into account. For example:
<lang Haskell>test = "This {- is not the beginning of a block comment" -- Do your homework properly -}</lang>
Comment delimiters can be changed by calling stripComments with different start and end parameters.
Comment delimiters can be changed by calling stripComments with different start and end parameters.
<lang Haskell>import Data.List
<lang Haskell>import Data.List