aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target/common_lisp.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/target/common_lisp.lux')
-rw-r--r--stdlib/source/library/lux/target/common_lisp.lux48
1 files changed, 25 insertions, 23 deletions
diff --git a/stdlib/source/library/lux/target/common_lisp.lux b/stdlib/source/library/lux/target/common_lisp.lux
index 3019924da..5a5b10a06 100644
--- a/stdlib/source/library/lux/target/common_lisp.lux
+++ b/stdlib/source/library/lux/target/common_lisp.lux
@@ -60,8 +60,9 @@
)
(type: .public Lambda
- {#input Var/*
- #output (Expression Any)})
+ (Record
+ {#input Var/*
+ #output (Expression Any)}))
(def: .public nil
Literal
@@ -146,7 +147,7 @@
(def: .public args
(-> (List Var/1) Var/*)
- (|>> (list\map ..code)
+ (|>> (list\each ..code)
(text.interposed " ")
..as_form
:abstraction))
@@ -159,7 +160,7 @@
(#.Item _)
(|> singles
- (list\map ..code)
+ (list\each ..code)
(text.interposed " ")
(text.suffix " ")))
(format "&rest " (:representation rest))
@@ -168,7 +169,7 @@
(def: form
(-> (List (Expression Any)) Expression)
- (|>> (list\map ..code)
+ (|>> (list\each ..code)
(text.interposed " ")
..as_form
:abstraction))
@@ -189,9 +190,9 @@
(def: .public (labels definitions body)
(-> (List [Var/1 Lambda]) (Expression Any) (Computation Any))
(..form (list (..var "labels")
- (..form (list\map (function (_ [def_name [def_args def_body]])
- (..form (list def_name (:transmutation def_args) def_body)))
- definitions))
+ (..form (list\each (function (_ [def_name [def_args def_body]])
+ (..form (list def_name (:transmutation def_args) def_body)))
+ definitions))
body)))
(def: .public (destructuring_bind [bindings expression] body)
@@ -349,8 +350,8 @@
(-> (List [Var/1 (Expression Any)]) (List (Expression Any)) (Computation Any))
(..form (list& (..var <host_name>)
(|> bindings
- (list\map (function (_ [name value])
- (..form (list name value))))
+ (list\each (function (_ [name value])
+ (..form (list name value))))
..form)
body)))]
@@ -385,19 +386,20 @@
(..form (list (..var "setf") access value)))
(type: .public Handler
- {#condition_type (Expression Any)
- #condition Var/1
- #body (Expression Any)})
+ (Record
+ {#condition_type (Expression Any)
+ #condition Var/1
+ #body (Expression Any)}))
(def: .public (handler_case handlers body)
(-> (List Handler) (Expression Any) (Computation Any))
(..form (list& (..var "handler-case")
body
- (list\map (function (_ [type condition handler])
- (..form (list type
- (:transmutation (..args (list condition)))
- handler)))
- handlers))))
+ (list\each (function (_ [type condition handler])
+ (..form (list type
+ (:transmutation (..args (list condition)))
+ handler)))
+ handlers))))
(template [<name> <prefix>]
[(def: .public (<name> conditions expression)
@@ -412,7 +414,7 @@
_
(:abstraction
- (format <prefix> (|> conditions (list\map ..symbol)
+ (format <prefix> (|> conditions (list\each ..symbol)
(list& (..symbol "or")) ..form
:representation)
" " (:representation expression)))))]
@@ -439,10 +441,10 @@
(def: .public (cond clauses else)
(-> (List [(Expression Any) (Expression Any)]) (Expression Any) (Computation Any))
(..form (list& (..var "cond")
- (list\compose (list\map (function (_ [test then])
- (..form (list test then)))
- clauses)
- (list (..form (list (..bool true) else)))))))
+ (list\composite (list\each (function (_ [test then])
+ (..form (list test then)))
+ clauses)
+ (list (..form (list (..bool true) else)))))))
(def: .public tag
(-> Text Tag)