Elm has “if", like ?: in C, and the more general “case".

If you don’t like the medium post below, maybe you would like

http://www.cas.mcmaster.ca/~anand/ThinkingComputationallyWithElm.pdf


> On Oct 16, 2016, at 6:05 PM, Patricia Nicole Benedicto 
> <patriciabenedict...@gmail.com> wrote:
> 
> 
> thankyou :) but how about the selection control structure and i will ask 
> again about how elm declaring an array?  :)
> On Wednesday, October 12, 2016 at 7:37:18 PM UTC+8, Eduardo Cuducos wrote:
> 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
>  
> <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/ <http://cuducos.me/>
> 
> On Wed, Oct 12, 2016 at 8:29 AM, Peter Damoc <pda...@gmail.com <javascript:>> 
> 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 
> <patriciab...@gmail.com <javascript:>> 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...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> 
> 
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/ <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...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout 
> <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 
> <mailto:elm-discuss+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <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