100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
OSPP MODULE 8 (1). $7.99   Add to cart

Exam (elaborations)

OSPP MODULE 8 (1).

 2 views  0 purchase
  • Course
  • Institution

Exam of 4 pages for the course OSPP105 at OSPP105 (OSPP MODULE 8 (1).)

Preview 1 out of 4  pages

  • August 11, 2024
  • 4
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
avatar-seller
OSPP MODULE 8
Basically, functional programming has functions that are similar to mathematical functions, as in
we have an
input which will give us a specific output. It does not concern side-effects, changing the state or
properties
of data but instead merely produces a separate result. - ANS-In short, how is the functional
programming paradigm different from the imperative programming
paradigm?

Head is the first element of the list, tail is the rest of the list. - ANS-What is meant by the head
and tail of a list?

A predicate is a function that returns true or false. any (example function) is true if there is a
term X
in the list such that P(X) is true. - ANS-What is meant by a predicate?

The number of parameters to a function. - ANS-What is meant by arity?

Takes a function as an argument, for example foldl. Can also be something that returns a
function as
its result. - ANS-What is meant by a higher order function?

A function that is not bound to an identifier. - ANS-What is meant by an anonymous function?

They are often used as arguments to higher order functions. - ANS-How does anonymous
functions relate to higher order functions?

map: Applies a function to every element in a list.
filter: Takes a predicate, a list and returns a list of all elements that satisfy the predicate.

zip: Combines two lists (for examples containing x's and y's) into a list containing tuples where
the first
tuple contains (x1,y1).

fold: Takes a function, accumulator and a list. Applies the function between each element of the
list
and stores the result in the accumulator. - ANS-Four common operations on lists are: map, filter,
zip, and fold. In brief, describe these operations.

A function calls upon itself inside it. - ANS-In computer science, what is meant by recursion?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller topgradesdr. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62890 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart