Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

99 Elm Problems/Passing functions as arguments

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

In many programming languages functions are first-class. This means that a function is a value that can be passed as a argument to other functions. Functions are as fundamental as integers, characters, booleans and strings. The problems below demonstrate functions in the Elm core that take functions as arguments. Likewise, you will often create your own functions that take functions as arguments. Functions that take functions Problem 28 - Use List.sortBy to sort a list. Problem 31 - Use List.filter to implement the Sieve of Eratosthenes. Problem 34 - Use List.filter to implement Euler’s totient function.