openlang

Supplying list elements individually when calling procedures that expect separate parameters -- "spreading out list values"

I'd like min/max to accept LISTS containing numbers instead of separate numeric arguments. For example: (min '[5 2 4 1]) = 1, although currently I must write (min 5 2 4 1). This works perfectly well when the argument sequence is written literally, but if the list comes from a computation, I'd like some way to "spread out" that list into the argument form min/max expects. So far I haven't located such a facility.

The conversation continues 2

Follow the reasoning

Other sides of the same question

  1. Formatting list elements as text with functional programming

    I'm a functional programming beginner, trying to create a function which accepts values in a list (whose length isn't fixed)…

    Replies 2Latest activity gleam
  2. Lean4 reports that 'begin' is unknown

    In the VSCode editor, I entered this Lean4 code: and got "unknown identifier 'begin'". Adding end three lines below gives "in…

    Replies 2Latest activity lean-4
  3. A JavaScript class to take?

    The last year I consulted JavaScript documentation was 1996. I'd like an educational course covering the “essential JavaScrip…

    Replies 2Latest activity elmjavascript