Hi Patricia,

Elm, as a functional language, doesn't have for and while as declarative
languages. There a lot of paradigms to have in mind: the sort of problem
loops address in declarative languages usually is addressed with recursion
in Elm and other functional languages (as Duane said).

IMHO a really good introduction to these new paradigms is this series of
articles
https://medium.com/@cscalfani/so-you-want-to-be-a-functional-programmer-part-1-1f15e387e536

Hope you enjoy and come back with more doubts ; )





Eduardo Cuducos
http://cuducos.me/

On Wed, Oct 12, 2016 at 8:29 AM, Peter Damoc <pda...@gmail.com> wrote:

> What do you need repetition for?
>
> If you give us some examples of what you are trying to achieve, maybe we
> can give you some examples of how that would look in Elm.
>
> If you want to process each element of a list, `map` is the best option.
> If you want to extract a sub list based on some criteria `filter` is
> needed
> If you want to create a value from a list (like adding all elements in a
> list of ints) then foldl or foldr are the functions to use.
>
>
>
>
> On Wed, Oct 12, 2016 at 12:44 PM, Patricia Nicole Benedicto <
> patriciabenedict...@gmail.com> wrote:
>
>> hi can i ask what is the repetiton control structucture of this
>> programming languages?
>>
>> --
>> 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 elm-discuss+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/
>
> --
> 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 elm-discuss+unsubscr...@googlegroups.com.
> 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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to