Brace expansion: Difference between revisions
→{{header|Haskell}}: Updated the 4th tstring, but the Reddit-sourced, linked, and Raku-translating grammar still seems a little off with commas.
(→{{header|Haskell}}: Added type signatures, disaggregated a little.) |
(→{{header|Haskell}}: Updated the 4th tstring, but the Reddit-sourced, linked, and Raku-translating grammar still seems a little off with commas.) |
||
Line 1,564:
showExpansion :: String -> String
showExpansion =
(<>) . (<> "\n-->\n") <*> (either show unlines . P.parse parser [])
parser :: P.Parsec String u [String]
Line 1,602:
, "It{{em,alic}iz,erat}e{d,}, please."
, "{,{,gotta have{ ,\\, again\\, }}more }cowbell!"
, "{}} some }{,{\\\\{ edge,
]</lang>
{{out}}
<pre>It{{em,alic}iz,erat}e{d,}, please.▼
▲It{{em,alic}iz,erat}e{d,}, please.
-->
Itemized, please.
Line 1,630 ⟶ 1,621:
gotta have\, again\, more cowbell!
{}} some }{,{\\{ edge,
-->
{}} some
{}} some }{\\
{}} some }{\\ edge \,{ cases, {here} \\\\\}</pre>
=={{header|J}}==
|