Hello, the answer depends a bit on what you intend to do with the Bools
after you have them...
But if, as you describe, you just want to end up with a List of Bools, then
List.map (\r -> r.age >= 21) yourRecords
But I expect you may also be interested in one of `List.filter`,
`List.all`, or `List.any`.
http://package.elm-lang.org/packages/elm-lang/core/5.0.0/List
On Mon, Dec 26, 2016 at 5:40 AM, <[email protected]> wrote:
> Hello,
> I am new to elm syntax. I have a list of records with name and age. I want
> to apply a test function to each record. The function takes one record as
> input and returns a boolean value. Depending on True or false, I want to
> take a specific action for each record. How can I implement this in elm? If
> it was Python, I will just iterate over each item in the list and pass it
> as a parameter to the function.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.