Version 0.14.0 of package Loopy has just been released in NonGNU ELPA.
You can now find it in M-x list-packages RET.

Loopy describes itself as:

  ===============
  A looping macro
  ===============

More at https://elpa.nongnu.org/nongnu/loopy.html

## Summary:

                   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                    LOOPY: A LOOPING AND ITERATION MACRO
                   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


  `loopy': [file:https://melpa.org/packages/loopy-badge.svg]

  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

  `loopy' is a macro meant for iterating and looping.  It is similar in
  usage to [`cl-loop'] but uses symbolic expressions rather than keywords.

  For most use cases, `loopy' should be a nice substitute for `cl-loop'
  and complementary to the features provided by the [Seq] and [CL]
  libraries and Emacs's regular looping and mapping features.

  For detailed information, see [the documentation file].  This README is
  just an overview.

## Recent NEWS:

# CHANGELOG

This document describes the user-facing changes to Loopy.

For Loopy Dash, see <https://github.com/okamsn/loopy-dash>.

## 0.14.0

### Commands for Generic (`seq.el`) Sequences

Loopy can now loop through generic sequences implemented by the library `seq.el`
([#215], [#150], [#136]).  Currently, this is done naively via the functions
`seq-elt` and `seq-length`.  Because a package might implement a generic
sequence using one of the built-in sequence types (lists and arrays), no attempt
is made to optimize behavior for particular kinds of sequences.  As a
comparison, the `sequence` command gives special consideration to lists in some
circumstances.

Because these commands use `seq-length`, they do not work with infinite
sequences.  For that, consider using the `stream` command.

The new commands are `seq` and `seq-ref`, which were previously aliases of
`sequence` and `sequence-ref`, respectively ([#126, #206]).  This change should
not cause an error, but the expanded code might be slower depending on the type
of the sequence.

`sequence-index`, which keeps the alias `seq-index`, has been changed to use
`seq-length` instead of `length`.  This command is simple enough that no special
version is needed for generic sequences.

### Breaking Changes

- Conflicting starting values for accumulation variables, such as from using
  `sum` (value: 0) and `multiply` (value: 1), now signal an error ([#169],
  [#203]).  In the future, they will signal an error.

  For now, Loopy continues the behavior of using the first found starting value
  from the macro arguments.  To silence this warning and to avoid this future
  error, use the `with` special macro argument to explicitly state a starting
  value for the accumulation variable.

- Remove the deprecated positional arguments to the `numbers` command ([#205]).

- To cut back on an over-abundance of choice and to simplify documentation, the
  following built-in aliases have been made obsolete ([#126], [#168], [#206],
  [#207]).  They can still be added manually via `loopy-defalias`.
  - `array`: `across`
  - `array-ref`: `arrayf`, `arrayingf`, `stringf`, `stringingf`, `across-ref`
  - `command-do`: `group`
  - `cons`: `on`
  - `list`: `in`
  - `list-ref`: `listf`, `listingf`, `in-ref`
  - `map-ref`: `mapf`, `mappingf`
  - `numbers`: `num`, `nums`
  - `numbers-down`: `nums-down`, `numdown`, `num-down`, `numsdown`
  - `numbers-up`: `nums-up`, `numup`, `num-up`, `numsup`
  - `set`: `expr`, `exprs`
  - `set-prev`: `prev`, `prev-expr`
  - `sequence`: `elements`
  - `sequence-index`: `sequencei`, `seqi`, `listi`, `arrayi`, `stringi`
  - `sequence-ref`: `sequencef`, `sequencingf`,
    `elements-ref`
  - `seq-ref`: `seqf` , `seqingf`

- Review when the values of keyword arguments are taken and used ([#210]):
  - Make the `close` keyword argument of the `iter` command able to be evaluated
    during run time ([#211]).  It was previously only used during macro 
expansion.
  - Make the `close` keyword argument of the `iter` command evaluated at the
    start of the loop to be consistent with other commands ([#211]).
  - Make the `on-failure` keyword argument of the `find` command evaluated at 
the
    start of the loop to be consistent with other commands ([#211]).
  - Allow the `unique` keyword argument of the commands `map` and `map-ref` to 
be
    evaluable at run time, instead of just checked at compile time ([#209]).

- Remove the initialization optimizations that produced faster code but
  could change final results ([#226, #204]).  For example, consider the
  difference results between `cl-loop` and SBCL's `loop`:

  ``` emacs-lisp
  ;; => (4 (1 2 3))
  (cl-loop for elem in (list 1 2 3)
           for i from 1
           collect i into is
           finally return (list i is))
  ```


  ``` common-lisp
  ;; => (3 (1 2 3))
  (loop for elem in (list 1 2 3)
        for num from 1
        collect num into nums
        finally (return (list num nums)))
  ```

  Loopy would give the same result as `cl-loop` when using the optimization and
...
...

Reply via email to