aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target/scheme.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/target/scheme.lux')
-rw-r--r--stdlib/source/library/lux/target/scheme.lux50
1 files changed, 26 insertions, 24 deletions
diff --git a/stdlib/source/library/lux/target/scheme.lux b/stdlib/source/library/lux/target/scheme.lux
index 5a90ecbe4..2ea9a66e8 100644
--- a/stdlib/source/library/lux/target/scheme.lux
+++ b/stdlib/source/library/lux/target/scheme.lux
@@ -6,7 +6,7 @@
[equivalence {"+" Equivalence}]
[hash {"+" Hash}]]
[control
- [pipe {"+" new> cond> case>}]]
+ ["[0]" pipe]]
[data
["[0]" text
["%" format {"+" format}]]
@@ -107,8 +107,9 @@
(def: .public bool
(-> Bit Computation)
- (|>> (case> #0 "#f"
- #1 "#t")
+ (|>> (pipe.case
+ #0 "#f"
+ #1 "#t")
:abstraction))
(def: .public int
@@ -117,17 +118,17 @@
(def: .public float
(-> Frac Computation)
- (|>> (cond> [(f.= f.positive_infinity)]
- [(new> "+inf.0" [])]
-
- [(f.= f.negative_infinity)]
- [(new> "-inf.0" [])]
-
- [f.not_a_number?]
- [(new> "+nan.0" [])]
-
- ... else
- [%.frac])
+ (|>> (pipe.cond [(f.= f.positive_infinity)]
+ [(pipe.new "+inf.0" [])]
+
+ [(f.= f.negative_infinity)]
+ [(pipe.new "-inf.0" [])]
+
+ [f.not_a_number?]
+ [(pipe.new "+nan.0" [])]
+
+ ... else
+ [%.frac])
:abstraction))
(def: .public positive_infinity Computation (..float f.positive_infinity))
@@ -161,16 +162,17 @@
(def: form
(-> (List (Code Any)) Code)
(.let [nested_new_line (format \n+ text.tab)]
- (|>> (case> {.#End}
- (:abstraction "()")
-
- {.#Item head tail}
- (|> tail
- (list#each (|>> :representation ..nested))
- {.#Item (:representation head)}
- (text.interposed nested_new_line)
- (text.enclosed ["(" ")"])
- :abstraction)))))
+ (|>> (pipe.case
+ {.#End}
+ (:abstraction "()")
+
+ {.#Item head tail}
+ (|> tail
+ (list#each (|>> :representation ..nested))
+ {.#Item (:representation head)}
+ (text.interposed nested_new_line)
+ (text.enclosed ["(" ")"])
+ :abstraction)))))
(def: .public (apply/* args func)
(-> (List Expression) Expression Computation)