From 132ffdae1add622c8a3c6065d7730a8fe8ea5e78 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 5 Sep 2021 22:52:26 -0400 Subject: Changed the syntax of do/be's (co)monad bindings. --- licentia/source/program/licentia.lux | 2 +- licentia/source/test/licentia.lux | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'licentia') diff --git a/licentia/source/program/licentia.lux b/licentia/source/program/licentia.lux index a6e0820c3..1f5b9c05d 100644 --- a/licentia/source/program/licentia.lux +++ b/licentia/source/program/licentia.lux @@ -66,7 +66,7 @@ [?done (: (IO (Try Any)) (do (try.with io.monad) [blob (\ file.default read input) - document (io\wrap (do {! try.monad} + document (io\wrap (do [! try.monad] [raw_json (\ utf8.codec decoded blob) json (|> raw_json java/lang/String::trim diff --git a/licentia/source/test/licentia.lux b/licentia/source/test/licentia.lux index e3204e598..8f967502a 100644 --- a/licentia/source/test/licentia.lux +++ b/licentia/source/test/licentia.lux @@ -46,7 +46,7 @@ (def: period (Random (Period Nat)) - (do {! random.monad} + (do [! random.monad] [start (random.filter (|>> (n.= n\top) not) random.nat) #let [wiggle_room (n.- start n\top)] @@ -108,7 +108,7 @@ (def: (variable_list max_size gen_element) (All (_ a) (-> Nat (Random a) (Random (List a)))) - (do {! random.monad} + (do [! random.monad] [amount (\ ! each (n.% (n.max 1 max_size)) random.nat)] (random.list amount gen_element))) -- cgit v1.2.3