Skip to content

Instantly share code, notes, and snippets.

@meijeru
Last active April 28, 2018 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meijeru/ddff7dec1d0bffe1e4ea6c74b4f192ee to your computer and use it in GitHub Desktop.
Save meijeru/ddff7dec1d0bffe1e4ea6c74b4f192ee to your computer and use it in GitHub Desktop.
flatten: func [
"Remove new-line markers from block, paren or hash"
blk [any-list!]
/deep "remove the markers also from sub-blocks etc."
][
new-line/all blk off
if deep [
forall blk [
if block? blk/1 [flatten/deep blk/1]
]
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment