เข้าสู่ระบบ สมัครสมาชิก

list comprehension การใช้

ประโยคมือถือ
  • List comprehensions are a special application of the list monad.
  • LINQ provides a capability over typical List Comprehension implementations.
  • For this reason, we adopt the list comprehension notation from functional languages.
  • Calls to foreach and list comprehensions are translated into tail-recursive predicates.
  • List comprehensions can be expressed with the loop macro's collect keyword.
  • Specific additional features include list comprehension and pattern matching.
  • Using list comprehension notation with \ denoting set subtraction of arithmetic progressions of numbers.
  • A list comprehension is a list whose first element has the functor': '.
  • A list comprehension is treated as a foreach call with an accumulator in the implementation.
  • List comprehensions are supported in Scheme through the use of the SRFI-42 library.
  • Introduced in Python 2.4, generator expressions are the lazy evaluation equivalent of list comprehensions.
  • Haskell features lazy evaluation, pattern matching, list comprehension, type classes, and type polymorphism.
  • The vertical bar is used for list comprehensions in some functional languages, e . g . set-builder notation.
  • The example above, of List comprehension in the sin ( ) function, is a useful feature in of itself.
  • A list of this form is interpreted as a list comprehension in calls to @ = / 2 and arithmetic constraints.
  • An exception was the influential pure lazy functional programming language Haskell includes many of Miranda's features, including list comprehensions.
  • In contrast, a list comprehension is functionally equivalent, but is " greedy " in performing all the work:
  • Burstall and Darlington's work with NPL influenced many functional programming languages during the 1980s, but not all included list comprehensions.
  • For example, the list comprehension [ 2 * x | x corresponds to the computation in the list monad do { x.
  • NPL eventually evolved into Hope but lost set comprehensions, which made a reappearance in the form of list comprehensions in later functional languages.
  • ตัวอย่างการใช้เพิ่มเติม:   1  2