From 94e5802f594a73245fce0fbd885103b8bf210d57 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 2 Dec 2022 19:33:00 -0400 Subject: Added some simple time-series handling machinery. --- .../source/polytypic/lux/abstract/equivalence.lux | 4 ++-- stdlib/source/polytypic/lux/data/format/json.lux | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'stdlib/source/polytypic') diff --git a/stdlib/source/polytypic/lux/abstract/equivalence.lux b/stdlib/source/polytypic/lux/abstract/equivalence.lux index a79fd9c2a..1b845ae8e 100644 --- a/stdlib/source/polytypic/lux/abstract/equivalence.lux +++ b/stdlib/source/polytypic/lux/abstract/equivalence.lux @@ -164,6 +164,6 @@ .recursive_call ... If all else fails... (|> .any - (at ! each (|>> %.type (format "Cannot create Equivalence for: ") <>.failure)) - (at ! conjoint)) + (of ! each (|>> %.type (format "Cannot create Equivalence for: ") <>.failure)) + (of ! conjoint)) ))))) diff --git a/stdlib/source/polytypic/lux/data/format/json.lux b/stdlib/source/polytypic/lux/data/format/json.lux index 333f0c323..9d2639e25 100644 --- a/stdlib/source/polytypic/lux/data/format/json.lux +++ b/stdlib/source/polytypic/lux/data/format/json.lux @@ -77,9 +77,9 @@ (codec.Codec JSON Int) (implementation (def encoded - (|>> .nat (at nat_codec encoded))) + (|>> .nat (of nat_codec encoded))) (def decoded - (|>> (at nat_codec decoded) (at try.functor each (|>> .int)))))) + (|>> (of nat_codec decoded) (of try.functor each (|>> .int)))))) ... Builds a JSON generator for potentially inexistent values. (def .public (nullable format) @@ -95,10 +95,10 @@ (implementation (def encoded (|>> unit.number - (at ..int_codec encoded))) + (of ..int_codec encoded))) (def decoded - (|>> (at ..int_codec decoded) - (at try.functor each unit.measure))))) + (|>> (of ..int_codec decoded) + (of try.functor each unit.measure))))) (def encoded (polytypic encoded @@ -112,15 +112,15 @@ [(.exactly Any) (function ((, g!_) (, (code.symbol ["" "0"]))) {/.#Null})] [(.sub Bit) (|>> {/.#Boolean})] - [(.sub Nat) (at ..nat_codec (,' encoded))] - [(.sub Int) (at ..int_codec (,' encoded))] + [(.sub Nat) (of ..nat_codec (,' encoded))] + [(.sub Int) (of ..int_codec (,' encoded))] [(.sub Frac) (|>> {/.#Number})] [(.sub Text) (|>> {/.#String})])