diff options
Diffstat (limited to 'stdlib/source/library/lux/control/exception.lux')
-rw-r--r-- | stdlib/source/library/lux/control/exception.lux | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index d957188ea..c59767584 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -13,7 +13,7 @@ ["." product] ["." text ("#\." monoid)] [collection - ["." list ("#\." functor fold)]]] + ["." list ("#\." functor mix)]]] [macro ["." code] [syntax (#+ syntax:) @@ -108,10 +108,10 @@ (def: (report' entries) (-> (List [Text Text]) Text) (let [header_separator ": " - largest_header_size (list\fold (function (_ [header _] max) - (n.max (text.size header) max)) - 0 - entries) + largest_header_size (list\mix (function (_ [header _] max) + (n.max (text.size header) max)) + 0 + entries) on_new_line (|> " " (list.repeated (n.+ (text.size header_separator) largest_header_size)) @@ -131,10 +131,10 @@ "" (#.Item head tail) - (list\fold (function (_ post pre) - ($_ text\compose pre text.new_line (on_entry post))) - (on_entry head) - tail)))) + (list\mix (function (_ post pre) + ($_ text\compose pre text.new_line (on_entry post))) + (on_entry head) + tail)))) (syntax: .public (report [entries (<>.many (<code>.tuple (<>.and <code>.any <code>.any)))]) (in (list (` ((~! report') (list (~+ (|> entries @@ -145,11 +145,11 @@ (All [a] (-> (-> a Text) (List a) Text)) (|> entries - (list\fold (function (_ entry [index next]) - [(++ index) - (#.Item [(n\encode index) (format entry)] - next)]) - [0 #.End]) + (list\mix (function (_ entry [index next]) + [(++ index) + (#.Item [(n\encoded index) (format entry)] + next)]) + [0 #.End]) product.right list.reversed ..report')) |