Skip to content

Commit

Permalink
Re-named reversed to in_reverse, and sorted to in_order.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed Nov 25, 2024
1 parent 17060df commit e6bc86a
Show file tree
Hide file tree
Showing 102 changed files with 472 additions and 386 deletions.
8 changes: 4 additions & 4 deletions aedifex/source/program/aedifex/command/deps.lux
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@
(///dependency/deployment.all local))
_ (console.write_line (exception.report
(list ["Local successes" (|> local_successes
(list.sorted (by ///dependency.order <))
(list.in_order (by ///dependency.order <))
(exception.listing ..as_text))]
["Local failures" (|> local_failures
(list.sorted (by ///dependency.order <))
(list.in_order (by ///dependency.order <))
(exception.listing ..as_text))]
["Remote successes" (|> remote_successes
(set.of_list ///dependency.hash)
(set.difference (set.of_list ///dependency.hash local_successes))
set.as_list
(list.sorted (by ///dependency.order <))
(list.in_order (by ///dependency.order <))
(exception.listing ..as_text))]
["Remote failures" (|> remote_failures
(list.sorted (by ///dependency.order <))
(list.in_order (by ///dependency.order <))
(exception.listing ..as_text))]))
console)]
(pure resolution))))
2 changes: 1 addition & 1 deletion aedifex/source/test/aedifex/runtime.lux
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
(its /.#program runtime'))
(|> runtime'
(its /.#parameters)
list.reversed
list.in_reverse
(list.item 0)
(maybe#each (text.= path))
(maybe.else false)))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
($.definition /.monoid)
($.definition /.functor)
($.definition /.monad)
($.definition /.reversed)
($.definition /.in_reverse)
($.definition /.every?)
($.definition /.any?)

Expand Down
8 changes: 4 additions & 4 deletions stdlib/source/documentation/lux/data/collection/stack.lux
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
""
($.example (' (mixes f init inputs))))

($.definition /.reversed
($.definition /.in_reverse
""
($.example (' (reversed xs))))
($.example (' (in_reverse xs))))

($.definition /.only
"A list with only values that satisfy the predicate."
Expand Down Expand Up @@ -117,9 +117,9 @@
"Fetches the element at the specified index."
($.example (' (item i xs))))

($.definition /.sorted
($.definition /.in_order
"A list ordered by a comparison function."
($.example (' (sorted < xs))))
($.example (' (in_order < xs))))

($.definition /.empty?
""
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/documentation/lux/math/number/i64.lux
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
($.definition /.hash)
($.definition /.disjunction)
($.definition /.conjunction)
($.definition /.reversed)
($.definition /.in_reverse)
($.definition /.left_rotated)
($.definition /.right_rotated)

Expand Down
58 changes: 29 additions & 29 deletions stdlib/source/library/lux.lux
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@
(Function {#Parameter ..argument 0}
{#Parameter ..argument 0})}})

(the' .private stack#reversed
(the' .private stack#in_reverse
{#Quantification .universal {#Empty}
($ Change ($ Stack {#Parameter ..argument 0}))}
(stack#mix (function' (_ head tail)
Expand Down Expand Up @@ -1246,7 +1246,7 @@
(list#each' (function' (_ address item) (value item))
it))

(the' .private (list#reversed it)
(the' .private (list#in_reverse it)
{#Quantification .universal {#Empty}
($ Change ($ List {#Parameter ..argument 0}))}
(list#of_array (.when# (.list_size# it)
Expand Down Expand Up @@ -1555,7 +1555,7 @@
(the' .public ->
Macro
(macro (_ tokens)
(.when# (list#split 1 (list#reversed tokens))
(.when# (list#split 1 (list#in_reverse tokens))
[(.list# output) inputs]
(meta#pure (list (list#mix ..'Function output inputs)))

Expand All @@ -1568,12 +1568,12 @@
(meta#pure (list (list#mix' (function' (_ _ head tail)
('#Top head tail))
'#Empty
(list#reversed it))))))
(list#in_reverse it))))))

(the' .public Union
Macro
(macro (_ tokens)
(meta#pure (list (.when# (list#as_stack (list#reversed tokens))
(meta#pure (list (.when# (list#as_stack (list#in_reverse tokens))
{#Empty}
('prelude "Nothing")

Expand All @@ -1589,7 +1589,7 @@
(the' .public Tuple
Macro
(macro (_ tokens)
(meta#pure (list (.when# (list#as_stack (list#reversed tokens))
(meta#pure (list (.when# (list#as_stack (list#in_reverse tokens))
{#Empty}
('prelude "Any")

Expand Down Expand Up @@ -1643,7 +1643,7 @@
[label value]
('let label value body))))
body
(stack#reversed bindings))))
(stack#in_reverse bindings))))

{#None}
(failure ..wrong_syntax))
Expand Down Expand Up @@ -1696,7 +1696,7 @@
(macro (_ tokens)
(.when# (list#split 1 tokens)
[(.list# op) tokens']
(.when# (list#split 1 (list#reversed tokens'))
(.when# (list#split 1 (list#in_reverse tokens'))
[(.list# last) prevs]
(meta#pure (list (list#mix (right_associativity op) last prevs)))

Expand Down Expand Up @@ -1798,7 +1798,7 @@
body')
value))))))
body
(stack#reversed bindings))]
(stack#in_reverse bindings))]
(meta#pure (list ('let (code#tuple (list 'pure 'then)) monad body'))))

{#None}
Expand Down Expand Up @@ -1836,7 +1836,7 @@
(the' .public if
Macro
(macro (_ tokens)
(.when# (list#as_stack (list#reversed tokens))
(.when# (list#as_stack (list#in_reverse tokens))
{#Top else then,test/*}
(.when# (pairs then,test/*)
{#Some then,test/*}
Expand Down Expand Up @@ -2389,7 +2389,7 @@
_
(expanded_list head tail)))
empty_list
(list#reversed elements))
(list#in_reverse elements))
(with_monad meta#monad
[=elements (monad#each meta#monad (untemplated replace? subst) elements)]
(pure ('list =elements))))]
Expand Down Expand Up @@ -2630,7 +2630,7 @@
(the' .public <|
Macro
(macro (_ tokens)
(.when# (list#split 1 (list#reversed tokens))
(.when# (list#split 1 (list#in_reverse tokens))
[(.list# init) apps]
(meta#pure (list (list#mix (.is# (-> Code Code Code)
(function' (_ app acc)
Expand Down Expand Up @@ -3266,23 +3266,23 @@
(|> it
(list#each code#as_text)
(list#interposed " ")
list#reversed
list#in_reverse
(list#mix text#composite "")
(text#enclosed ["(" ")"]))

{#Tuple _ it}
(|> it
(list#each code#as_text)
(list#interposed " ")
list#reversed
list#in_reverse
(list#mix text#composite "")
(text#enclosed ["[" "]"]))

{#Variant _ it}
(|> it
(list#each code#as_text)
(list#interposed " ")
list#reversed
list#in_reverse
(list#mix text#composite "")
(text#enclosed ["{" "}"]))))

Expand Down Expand Up @@ -3330,7 +3330,7 @@
(the' .public exec
Macro
(macro (_ tokens)
(.when# (?#value (list#reversed tokens)
(.when# (?#value (list#in_reverse tokens)
(?#and ?#any ?#rest))
{#Some [value actions]}
(let' [dummy (code#local "")]
Expand Down Expand Up @@ -3629,7 +3629,7 @@
"[" (bit#as_text polarity)
" " (type#as_text it)
"]"))))
list#reversed
list#in_reverse
(list#mix' (function' (_ _ left right) (text left right))
""))
")")
Expand Down Expand Up @@ -3661,7 +3661,7 @@
(|> args
(list#each type#as_text)
(list#interposed " ")
list#reversed
list#in_reverse
(list#mix text#composite ""))
")"))

Expand Down Expand Up @@ -3935,7 +3935,7 @@
(?#value tokens))
{#Some [bindings body]}
(|> bindings
list#reversed
list#in_reverse
(list#mix (is (-> [Code Code] (Change Code))
(function' (_ lr body')
(let' [[l r] lr]
Expand Down Expand Up @@ -3971,7 +3971,7 @@
(` (.function# (, 'name) (, 'blank)
(.when (, 'blank) (, arg) (, body')))))))]
(meta#pure (list (nest (code#local 'name) head
(list#mix (nest 'blank) body (list#reversed tail))))))
(list#mix (nest 'blank) body (list#in_reverse tail))))))

else
(failure ..wrong_syntax))))
Expand Down Expand Up @@ -4047,7 +4047,7 @@
[(the .public <name>
(macro (_ tokens)
(meta#pure (list (when (|> (?#and ?#any ?#rest)
(?#value (list#reversed tokens)))
(?#value (list#in_reverse tokens)))
{.#Some [last init]}
(list#mix (is (-> Code (Change Code))
(function (_ pre post) (` <form>)))
Expand Down Expand Up @@ -4724,9 +4724,9 @@
jumps (.i64_-# 1 relatives)]
(if (natural#< (.list_size# parts) jumps)
(let [prefix (|> parts
list#reversed
list#in_reverse
(list#after jumps)
list#reversed
list#in_reverse
(text#interposed ..module_delimiter))
clean (.text_clip# relatives (|> module .text_size# (.i64_-# relatives)) module)
output (when (.text_size# clean)
Expand Down Expand Up @@ -4989,7 +4989,7 @@
(stack#mix (function' (_ head tail)
{#Top (value head) tail})
{#Empty}
(stack#reversed it)))
(stack#in_reverse it)))

(the (clean_type variables it)
(-> (List (Maybe Type))
Expand Down Expand Up @@ -5307,7 +5307,7 @@
[(list) (list)]
implementations))
.let [[pre_defs implementations] pre_defs,implementations]]
(pure (list (` (these (,* (list#reversed pre_defs))
(pure (list (` (these (,* (list#in_reverse pre_defs))
(..use (, (code#text current_module))
(, (code#text imported_module))
(, (code#text import_alias))
Expand Down Expand Up @@ -5434,7 +5434,7 @@
(function (_ [s b] v)
(` (..has (, s) (, v) (, b)))))
value
(list#reversed pairs))
(list#in_reverse pairs))
[_ accesses] (list#mix (is (-> [Code Code]
(Change [Code (List Code)]))
(function (_ [new_slot new_binding] [old_record accesses'])
Expand Down Expand Up @@ -5595,7 +5595,7 @@
(the 'stack
(-> (Stack Code)
Code)
(|>> stack#reversed
(|>> stack#in_reverse
(stack#mix '#Top '#Empty)))

(the (type_code type)
Expand Down Expand Up @@ -6009,7 +6009,7 @@
[(with_monad meta#monad
[<*>' (monad#each meta#monad embedded_expansions <*>)]
(pure [(|> <*>'
list#reversed
list#in_reverse
(list#each product#left)
list#conjoint)
{<tag> <@> (list#each product#right <*>')}]))]))
Expand Down Expand Up @@ -6202,7 +6202,7 @@
... https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)
(the .public <-
(macro (_ parameters)
(meta#pure (list (` (.-> (,* (list#reversed parameters))))))))
(meta#pure (list (` (.-> (,* (list#in_reverse parameters))))))))

... https://en.wikipedia.org/wiki/Number#Classification
(alias [N Nat]
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/library/lux/abstract/comonad.lux
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
_
<default>)))))
body
(list.reversed bindings))]
(list.in_reverse bindings))]
(pure (list (when ?name
{.#Some name}
(.let [name {.#Name provenance.dummy ["" name]}]
Expand Down
4 changes: 2 additions & 2 deletions stdlib/source/library/lux/abstract/monad.lux
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
(the _meta#monad (.in_module# .prelude meta#monad))
(the _failure (.in_module# .prelude failure))
(the _expansion#let (.in_module# .prelude expansion#let))
(the list#reversed (.in_module# .prelude list#reversed))
(the list#in_reverse (.in_module# .prelude list#in_reverse))
(the list#mix (.in_module# .prelude list#mix))

(the ?#value (.in_module# .prelude ?#value))
Expand Down Expand Up @@ -77,7 +77,7 @@
_
<default>)))))
body
(list#reversed bindings))]
(list#in_reverse bindings))]
(pure (list (when ?name
{.#Some name}
(.let [name {.#Name provenance.dummy ["" name]}]
Expand Down
2 changes: 1 addition & 1 deletion stdlib/source/library/lux/abstract/monad/indexed.lux
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
(, next))
(, value)))))
expression
(list.reversed context))]
(list.in_reverse context))]
(pure (list (when ?name
{.#Some name}
(.let [name (code.local name)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
... Tuple patterns can be exhaustive if there is exhaustiveness for all of
... their sub-patterns.
{@type.#Complex_Pattern {@type.#Complex_Tuple membersP+}}
(when (list.reversed membersP+)
(when (list.in_reverse membersP+)
(^.or (list)
(list _))
(exception.except ..invalid_tuple [(list.size membersP+)])
Expand Down Expand Up @@ -458,7 +458,7 @@
(again addition' possibilitiesSF')

{.#None}
(when (stack.reversed possibilitiesSF')
(when (stack.in_reverse possibilitiesSF')
{.#Top last prevs}
(pure (stack.mix (function (_ left right) {#Alt left right})
last
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
(List Type))
(|>> list.indices
(list#each (|>> {.#Parameter .argument}))
list.reversed))
list.in_reverse))

(template.with [<name> <types> <inputs> <exception> <when> <then>]
[(`` (the .public (<name> (,, (template.spliced <inputs>)) complex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
scope)
(product.right ref+inner)}]))
[init_ref {.#Empty}]
(stack.reversed inner))
(stack.in_reverse inner))
scopes (stack#composite inner' outer)]
{.#Right [(has @type.#scopes scopes state)
{.#Some [(@type.old ref_type) ref]}]})
Expand Down
Loading

0 comments on commit e6bc86a

Please sign in to comment.