Strip a set of characters from a string: Difference between revisions
Content added Content deleted
(PascalABC.NET) |
(Add Uiua) |
||
Line 2,931: | Line 2,931: | ||
<code>(do if (memq @1 set) (list @1))</code> is just <code>(lambda (item) (if (memq item set) (list item)))</code>. |
<code>(do if (memq @1 set) (list @1))</code> is just <code>(lambda (item) (if (memq item set) (list item)))</code>. |
||
<code>mappend</code> happily maps over strings and since the leftmost input sequence is a string, and the return values of the lambda are sequence of characters, <code>mappend</code> produces a string. |
<code>mappend</code> happily maps over strings and since the leftmost input sequence is a string, and the return values of the lambda are sequence of characters, <code>mappend</code> produces a string. |
||
=={{header|Uiua}}== |
|||
{{works with|Uiua|0.11.1}} |
|||
<syntaxhighlight lang="uiua"> |
|||
Strip ← ▽¬∊, |
|||
Strip "aei" "She was a soul stripper. She took my heart!" |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
"Sh ws soul strppr. Sh took my hrt!" |
|||
</pre> |
|||
=={{header|UNIX Shell}}== |
=={{header|UNIX Shell}}== |