diff options
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 % |