diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-08-04 15:12:55 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-08-04 15:12:55 +0200 |
commit | 396ebf0c76153e5e1e9dc77371bdd02b4d3d85d1 (patch) | |
tree | 3c2aab25631581d5367a6288c2eb9e0f812d76b0 /common.sml | |
parent | 671760c2b5857312cac178f24cad8686c1d4b719 (diff) |
Flattening of initializers
Diffstat (limited to 'common.sml')
-rw-r--r-- | common.sml | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -169,14 +169,14 @@ fun poptN z = poptInternal false z val Popt = fn z => bind A2 (poptInternal false "") z val PoptS = fn z => bind A2 (poptInternal true "") z -fun plist p l (s, parens) out = +fun plist p l (s, parens, from) out = let fun f [] _ = () | f [e] out = Printf out A1 p e % | f (e1 :: e2 :: tail) out = (Printf out A1 p e1 %; Printf out `s A1 f (e2 :: tail) %) in - if parens andalso length l > 1 then + if parens andalso length l >= from then Printf out `"(" A1 f l `")" % else Printf out A1 f l % |