From ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 6 Apr 2018 08:32:41 -0400 Subject: - Adapted new-luxc's code to latest stdlib changes. --- new-luxc/source/luxc/lang/host/python.lux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'new-luxc/source/luxc/lang/host/python.lux') diff --git a/new-luxc/source/luxc/lang/host/python.lux b/new-luxc/source/luxc/lang/host/python.lux index 335d418a3..8e42ff0a5 100644 --- a/new-luxc/source/luxc/lang/host/python.lux +++ b/new-luxc/source/luxc/lang/host/python.lux @@ -1,5 +1,5 @@ (.module: - [lux #- not or and list if is] + [lux #- not or and list if] (lux (control pipe) (data [text] text/format @@ -79,7 +79,7 @@ (def: (composite-literal left-delimiter right-delimiter entry-serializer) (All [a] (-> Text Text (-> a Text) (-> (List a) Expression))) - (function [entries] + (function (_ entries) (@abstraction (format "(" left-delimiter (|> entries (list/map entry-serializer) (text.join-with ",")) right-delimiter ")")))) @@ -107,7 +107,7 @@ (def: #export dict (-> (List [Expression Expression]) Expression) - (composite-literal "{" "}" (.function [[k v]] (format (@representation k) " : " (@representation v))))) + (composite-literal "{" "}" (.function (_ [k v]) (format (@representation k) " : " (@representation v))))) (def: #export (apply args func) (-> (List Expression) Expression Expression) @@ -129,7 +129,7 @@ (-> (List Expression) Expression Expression Expression) (@abstraction (format "(" (@representation func) (format "(" (|> args - (list/map (function [arg] (format (@representation arg) ", "))) + (list/map (function (_ arg) (format (@representation arg) ", "))) (text.join-with "")) ( extra) ")") ")")))] @@ -266,7 +266,7 @@ (def: #export (cond! clauses else!) (-> (List [Expression Statement]) Statement Statement) - (list/fold (.function [[test then!] next!] + (list/fold (.function (_ [test then!] next!) (if! test then! next!)) else! (list.reverse clauses))) @@ -310,7 +310,7 @@ (format "try:" (nest body!) (|> excepts - (list/map (function [[classes exception catch!]] + (list/map (function (_ [classes exception catch!]) (format "\n" "except (" (text.join-with "," classes) ") as " (..name exception) ":" (nest catch!)))) -- cgit v1.2.3