Last active
April 28, 2018 12:42
-
-
Save meijeru/ddff7dec1d0bffe1e4ea6c74b4f192ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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