compound seq fn: smerge
smerge:
description:
smerge seq
smerge["str"] seq
merges a sequence into a single string, optionally separated by the str string
examples:
smerge (|F> . |r> . |e> . |d>)
|Fred>
smerge[", "] (|a> . |b> . |c> . |d>)
|a, b, c, d>
-- define the bracket operator:
bracket (*) #=> |[> _ smerge[", "] |__self> _ |]>
-- define the print-bracket operator:
print-bracket (*) #=> print bracket |__self>
-- quick test of the bracket operator:
bracket (|F> . |r> . |e> . |d>)
|[F, r, e, d]>
-- quick test of the print-bracket operator:
print-bracket (|F> . |r> . |e> . |d>)
[F, r, e, d]
|[F, r, e, d]>
see also:
ssplit, smap
Home