Mercurial > urweb
comparison lib/ur/string.ur @ 1122:85d194409b17
Reduce concatenations of the empty record; unpoly non-recursive functions
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 10 Jan 2010 13:44:22 -0500 |
parents | eaba663fd6aa |
children | 94e83c5533d2 |
comparison
equal
deleted
inserted
replaced
1121:0cee0c8d8c37 | 1122:85d194409b17 |
---|---|
35 i >= len | 35 i >= len |
36 || (f (sub s i) && al (i + 1)) | 36 || (f (sub s i) && al (i + 1)) |
37 in | 37 in |
38 al 0 | 38 al 0 |
39 end | 39 end |
40 | |
41 fun newlines [ctx] [[Body] ~ ctx] s : xml ([Body] ++ ctx) [] [] = | |
42 case split s #"\n" of | |
43 None => cdata s | |
44 | Some (s1, s2) => <xml>{[s1]}<br/>{newlines s2}</xml> |